Search code examples
postgresqluuid

Generate uuid in windows postgresql


I have a postgresql 9 installation on windows, which doesn't have built in uuid generator. There is OSSD package, which can be bound to postgresql as uuid generator, but it's for *nix only (I think).

How can I generate uuid in windows postgresql?


Solution

  • The one-click installer from EnterpriseDB does have it. The DLL is called "uuid-ossp.dll" and resides in "(Postgres' installation directory)\lib" and the installation SQL script is called "uuid-ossp.sql" and resides in "(Postgres' installation directory)\share\contrib". You have to execute the last one in the DB of your choice.