Install PL/Perl in PostgreSQL [closed] Install PL/Perl in PostgreSQL [closed] postgresql postgresql

Install PL/Perl in PostgreSQL [closed]


Before you do anything else, back up your database. At minimum use pg_dump to take a SQL dump and put it on another computer. Then proceed, but understand that you're likely to cause downtime or even data loss if you muck this up.

(For anyone else reading this, it only applies to PostgreSQL installed from source code. You are probably using a packaged version instead, in which case you should install the package for postgresql-contrib or postgresql-plperl for your distro. Names will vary, so do a search in your package management system.)


It seems highly likely that your co-worker installed PostgreSQL from source code and didn't enable PL/Perl. If you want PL/Perl you will need to re-compile.

Install the Perl development package, which should be called perl-devel, eg:

yum install perl-devel

When you re-compile PostgreSQL use the --with-perl argument to ./configure. You should be able to find the PostgreSQL source code tree that your co-worker used somewhere on the system - try searching for config.log and see if there's a PostgreSQL source code tree in the same place.

If you can't find it you'll have to either:

  • Download fresh PostgreSQL sources and compile them as per the PostgreSQL documentation; or
  • Shut down your current server and install the yum.postgresql.org RPMs to replace it.

Honestly, if you don't know Linux this isn't a good way to start. Find somebody to help you who's worked with Linux systems before and is familiar with basic tasks like installing packages. Get them to help you to replace the source-installed PostgreSQL with a PostgreSQL install from the yum.postgresql.org packages, and preferably update your rather outdated operating system install to a current one.