Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option for constraints
Дата
Msg-id bb81da77-a883-cb1d-d5dd-a52422e3ba33@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option forconstraints  (Andreas Joseph Krogh <andreas@visena.com>)
Ответы Re: [HACKERS] [PATCH] WIP Add ALWAYS DEFERRED option forconstraints  (Andreas Joseph Krogh <andreas@visena.com>)
Список pgsql-hackers
On 10/03/2017 10:10 PM, Andreas Joseph Krogh wrote:
> While we're in deferrable constraints land...; 
> I even more often need deferrable /conditional /unique-indexes.
> In PG you now may have:
> 
> ALTER TABLE email_folder ADD CONSTRAINT some_uk UNIQUE (owner_id, folder_type, name) DEFERRABLE INITIALLY DEFERRED;
> 
>  
> But this isn't supported:
> 
> CREATE UNIQUE INDEX some_uk ON email_folder(owner_id, folder_type, name) WHERE parent_id IS NULL DEFERRABLE INITIALLY
DEFERRED;
> 
> Are there any plans to support this?

I don't want to hijack the thread, but you can do that with exclusion
constraints.
-- 
Vik Fearing                                          +33 6 46 75 15 36
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: [HACKERS] generated columns
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] datetime.h defines like PM conflict with externallibraries