Installing "uuid-ossp" library in Postgres 9.1. (new Extension feature)

Поиск
Список
Период
Сортировка
От Basil Bourque
Тема Installing "uuid-ossp" library in Postgres 9.1. (new Extension feature)
Дата
Msg-id C5EBF511-835E-4F24-A4E4-6CC0119F48E4@me.com
обсуждение исходный текст
Ответы Re: Installing "uuid-ossp" library in Postgres 9.1. (new Extension feature)
Список pgsql-general
The "uuid-ossp" library enables you to generate UUID values server-side in Postgres.
http://www.postgresql.org/docs/current/static/uuid-ossp.html

The technique to install this library changed as of Postgres 9.1, because of the new Extension feature. Installing and
uninstallingare now easier. I have an overview on my blog, but I'm posting the brief steps here for posterity. 

To see what extensions are already installed in your Postgres, run this SQL:
  select * from pg_extension;

To see if the "uuid-ossp" extension is available, run this SQL:
  select * from pg_available_extensions;

To install/load the extension, run this SQL:
  CREATE EXTENSION "uuid-ossp";

I found the quote marks to be required despite the doc being contrary.

Doc on loading extensions:
http://www.postgresql.org/docs/current/static/sql-createextension.html

My blog post on this topic:
http://crafted-software.blogspot.com/2011/10/extensions-in-postgres.html

To install this library in versions of Postgres before 9.1:
http://crafted-software.blogspot.com/2011/10/using-uuid-library-in-postgres.html

--Basil Bourque

В списке pgsql-general по дате отправления:

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: how to find primary key field name?
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Installing "uuid-ossp" library in Postgres 9.1. (new Extension feature)