PostgreSQL

Postgres and directories

I had installed PostgreSQL, Apache, and PHP on my laptop (running Ubuntu 6.10 Edgy) to aid in development. But when I was attempting to load a copy of the production database into PostgreSQL, it kept giving me errors on setting up the functions. Turns out that PostgreSQL (which I installed with the Ubuntu GUI package system, Synaptic) was expecting a file at /usr/lib/pgsql/plpgsql.so, but the real file was at /usr/lib/postgresql/8.1/lib/plpgsql.so. In fact, checking the file system, there was no directory called pgsql in /usr/lib. Apparently, there's some kind of bug in the Debian packager.

The quickest fix I determined was to run the following to create a softlink:
$ sudo ln -s /usr/lib/postgresql/8.1/lib /usr/lib/pgsql

Now those functions setup without any errors.

PostgreSQL notes

You can use the PostgreSQL 8 Tools, such as pgdump, to dump data from a PostgreSQL 7.3 server! Of course, the other way (PG 7.3 tools to PG 8 server) doesn't work.

Syndicate content