PostgreSQL Windows x64: Enabling UUID-OSSP.sql

The background to this is that for that for over 6 months now, I have been working on developing a PostgreSQL Adapter for NexJ Express, a part of Open Health Tools. Though most of the development is done in Java, I have also learnt a lot about PostgreSQL.

The Problem:
Although PostgreSQL has a UUID type, the UUID generation is dependent on the UUID-OSSP.sql module which in turn depends on the OSSP-UUID library.
The PostgreSQL installer for Windows includes the UUID-OSSP.sql module for x86 builds but not for x64 builds (lastest version that I checked was PostgreSQL 9.0.4).
When I asked on #postgresql irc channel, one of the things I was told was that there was not OSSP-UUID library build for windows x64.

The Solution: (tested with PG 9.0.4 x64 build)
Turns out that there was a build of OSSP-UUID for x64 windows in the wild. Thanks to Hiroshi Saito, who replied to my message on the pg_general mailing list.

  1. Download pg90_uuid_ossp_x64.zip,
  2. Unzip the contents of the zip to path/to/PostgreSQL/9.0/
  3. Open psql and install uuid-ossp.sql using the command:
    \i 'path/to/PostgeSQL/9.0/share/contrib/uuid-ossp.sql'

Also, Hiroshi provides the source if you interested on compiling OSSP-UUID on x64 windows for yourself.

Advertisements
Tagged , , , ,

2 thoughts on “PostgreSQL Windows x64: Enabling UUID-OSSP.sql

  1. Checking the binary package for PostgreSQL 9.1 beta3, there seems to be an UUID library in there. Finally! This has been the only reason why I haven’t been able to upgrade from 8.4 to 9.0 x64 all this time. Maybe I’ll wait for 9.1 while I’m at it…

  2. […] PostgreSQL Windows x64: Enabling UUID-OSSP.sql […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: