Re: PARTIAL, DEFERRABLE UNIQUE CONSTRAINTS

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: PARTIAL, DEFERRABLE UNIQUE CONSTRAINTS
Дата
Msg-id 1410356721382-5818445.post@n5.nabble.com
обсуждение исходный текст
Ответ на PARTIAL, DEFERRABLE UNIQUE CONSTRAINTS  (Daniel Migowski <dmigowski@ikoffice.de>)
Ответы Re: PARTIAL, DEFERRABLE UNIQUE CONSTRAINTS  (Daniel Migowski <dmigowski@ikoffice.de>)
Список pgsql-general
dmigowski wrote
> I need to create a deferrable,unique partial constraint (using a WHERE
> clause) on my table

I don't know the exact required syntax but the description of the "EXCLUDE"
clause to "CREATE TABLE" implies that it can be used to accomplish what you
desire.

Not tested but something like:

EXCLUDE USING btree ( col WITH = ) WHERE ... DEFERRABLE INITIALLY IMMEDIATE

http://www.postgresql.org/docs/9.1/static/sql-createtable.html

While the documentation says that using btree with EXCLUDE is uncommon this
does seem to be a mandatory exception.

David J.







--
View this message in context:
http://postgresql.1045698.n5.nabble.com/PARTIAL-DEFERRABLE-UNIQUE-CONSTRAINTS-tp5818441p5818445.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: John DeSoi
Дата:
Сообщение: Re: Async IO HTTP server frontend for PostgreSQL
Следующее
От: Vinayak
Дата:
Сообщение: CREATE SYNONYM in PostgreSQL