Create a deferrably-unique index - Mailing list pgsql-general

From Paul Jungwirth
Subject Create a deferrably-unique index
Date
Msg-id CA+6hpakfbvG4MVWD_UzQPUT8+NjkbqS1bvKRUTENz5pu77Vg3Q@mail.gmail.com
Whole thread Raw
Responses Re: Create a deferrably-unique index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I'm trying to create a unique index where the unique constraint is
`deferrable initially immediate`. But I don't see any way to do this
in the syntax of the `create index` command. It looks like the only
way to do it is via `alter table foo add unique`. Is that right, or
can I do it as part of `create index`?

If I have to use `alter table add unique`, is there any way I can make
sure the implicitly-created index also has a `where` clause? Or is it
impossible to create an index that is unique + deferrable + partial?

Thank you,
Paul


--
_________________________________
Pulchritudo splendor veritatis.


pgsql-general by date:

Previous
From: Vick Khera
Date:
Subject: Re: please suggest i need to test my upgrade
Next
From: Granthana Biswas
Date:
Subject: AccessShareLock on pg_authid