oszd93
oszd93

Reputation: 193

How to tell PostgreSQL to use other Perl-Version?

Im working on a Ubuntu 14.04 64bit machine. I need to use Perl 5.14 to work with certain modules which wont install with the newest version of perl (5.18). My postgresql-9.3 server needs to install perl 5.18 while installing postgres-plperl. Therefore i want to tell Postgres to use the 5.14 version but i havent found a way to do that. Is there a way to do that?

Upvotes: 1

Views: 630

Answers (1)

Craig Ringer
Craig Ringer

Reputation: 324275

You must recompile the plperl extension against 5.14 if you really need this. PostgreSQL links against Perl as a library, and Perl libraries aren't ABI-compatible across releases, so you can't just substitute 5.14 for 5.18 at runtime.

You can change the Perl version used by performing an install of PostgreSQL from source and specifying the correct Perl install path to configure using --with-perl or the PATH env var.

Or you can apt-get source postgresql-9.3 and edit debian/rules to use the desired Perl, edit debian/control to specify the correct Perl dependency, and rebuild the package.

It makes a lot more sense to instead fix the modules.

Upvotes: 3

Related Questions