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

From Tom Lane
Subject Re: Create a deferrably-unique index
Date
Msg-id 23968.1376937261@sss.pgh.pa.us
Whole thread Raw
In response to Create a deferrably-unique index  (Paul Jungwirth <pj@illuminatedcomputing.com>)
Responses Re: Create a deferrably-unique index  (Paul Jungwirth <pj@illuminatedcomputing.com>)
List pgsql-general
Paul Jungwirth <pj@illuminatedcomputing.com> writes:
> 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`?

Deferrability is a property of a constraint, not an index, so you can
only specify it for indexes that are associated with constraints.
Yes, that limits the kinds of indexes that can be used ...

            regards, tom lane


pgsql-general by date:

Previous
From: Granthana Biswas
Date:
Subject: AccessShareLock on pg_authid
Next
From: Paul Jungwirth
Date:
Subject: Re: Create a deferrably-unique index