Generating a UUID in Postgres for Insert statement?
The answer by Craig Ringer is correct. Here's a little more info for Postgres 9.1 and later... You can only install an extension if it has already been built for your Postgres installation (your cluster in Postgres lingo). For example, I found the uuid-ossp extension included as part of the installer for Mac OS X kindly provided by EnterpriseDB.com.
https://stackoverflow.com/questions/12505158/generating-a-uuid-in-postgres-for-insert-statement
uuid-ossp
Development Versions: devel This documentation is for an unsupported version of PostgreSQL. You may want to view the same page for the current version, or one of the other supported versions listed above instead. The uuid-ossp module provides functions to generate universally unique identifiers (UUIDs) using one of several standard algorithms. There are also functions to produce certain special UUID constants.
https://www.postgresql.org/docs/9.4/uuid-ossp.html


Seonglae Cho