0

I had to do some strange voodoo last year sometime to get postgresql 8.4 installed on a relatively modern ubuntu OS. I had to use 8.4 because the production site is 8.4 and we needed to ensure compatibility in our test environment. (we have no control over the production environment)

Now I'm trying to generate uuid's in the db, but the contrib package for quantal requires 9.1.

Anybody know how I can do this without updating the postgres server?

~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.10
Release:        12.10
Codename:       quantal

PostgreSQL 8.4.11 on i686-pc-linux-gnu, compiled by GCC gcc-4.6.real (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 32-bit

Jeremy Holovacs
  • 399
  • 1
  • 6
  • 22

1 Answers1

0

Ubuntu 12.04 LTS (Precise) provides packages for PostgreSQL 8.4. Not exactly all the packages, but enough to include contrib as well:

dbuser@tratti:~$ apt-cache search postgresql|sort|grep 8.4                    
postgresql-8.4 - object-relational SQL database, version 8.4 server
postgresql-client-8.4 - front-end programs for PostgreSQL 8.4
postgresql-contrib-8.4 - additional facilities for PostgreSQL
postgresql-doc-8.4 - documentation for the PostgreSQL database management system
postgresql-plperl-8.4 - PL/Perl procedural language for PostgreSQL 8.4
postgresql-plpython-8.4 - PL/Python procedural language for PostgreSQL 8.4
postgresql-pltcl-8.4 - PL/Tcl procedural language for PostgreSQL 8.4
postgresql-server-dev-8.4 - development files for PostgreSQL 8.4 server-side programming

Now since you're using Ubuntu 12.10 which does not have long term support, it does not contain packages for PostgreSQL 8.4 (those being exactly what one might see fit for long term supportability).

However, there are no postgresql-8.4-* conflicting packages on 12.10. This means you could download manually those PostgreSQL 8.4 packages you need and install them with dpkg -i. You can find packages you're after, including the contrib, from Ubuntu Precise package listing page.

Probably you'll be downloading some dependencies as well, though, so you might try to (do this on some test machine first as it's very likely to break something): a) just toss in 12.04 repositories, b) run apt-get update, c) install just the packages you need, d) then remove 12.04 repositories and e) finally run apt-get update again to lose any leftovers there might be.

Lesson to learn here might be that never use anything but long term releases of Ubuntu on anything which has even remotely something to do with things called "production". Should you be running 12.04 LTS in the first place, you'd have been saved from this problem altogether.