Adding UUID functionality to your psql server (uuid-ossp)

Original article - Installing “uuid-ossp” library in psql 9.1


Login as postgres

$ psql -U postgres

Check to see if “uuid-ossp” is installed on your db server

select * from pg_extension;

If it is installed you should see it listed like it is below

If not present, install “uuid-ossp”

# CREATE EXTENSION "uuid-ossp";

Verify that it was installed correctly

# select * from pg_extension;

To see a list of available pg plugins you can type

# select * from pg_available_extensions;

Tangential Note: dropping an extension
* Ref: sql-dropextension
If you find the need to remove the uuid-ossp extension, you can do so by executing the below command.

# DROP EXTENSION "uuid-ossp";
Show your support

Clapping shows how much you appreciated Will Barnes’s story.