1
psql -1f check_email.pl.sql ccushing postgres
SET
psql:check_email.pl.sql:7: ERROR:  Can't locate Email/Valid.pm in @INC (@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at line 3.
BEGIN failed--compilation aborted at line 3.
CONTEXT:  compilation of PL/Perl function "check_email"

My current @INC is

@INC:
  /home/ccushing/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/x86_64-linux
  /home/ccushing/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2
  /home/ccushing/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2/x86_64-linux
  /home/ccushing/perl5/perlbrew/perls/perl-5.14.2/lib/5.14.2

obviously my problem is that Email::Valid is not in my @INC, can I globally change Postgres @INC Paths? also related is postgres only capable of using the Perl it's built against? or can I make it use my perlbrew.

1 Answer 1

1

Can't you just push it into @INC before you use it? At the first line in your func? I'm pretty sure that should work.

PostgreSQL will only use the perl it's built against. You'd have to rebuild it (or at least plperl) against your custom perl.

2
  • well part of the problem was that postgres didn't have read access to that directory. I ended up giving a local::lib to postgres Jan 4, 2012 at 0:10
  • @xenoterracide How did you give postgres a "local::lib"? -- If the related env vars are in my .bashrc, will that be adequate enough for the postgres install to see them?
    – Robbie
    Dec 13, 2012 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.