Re: [GENERAL] Create a deferrably-unique index

2013-08-19 Thread Tom Lane
Paul Jungwirth writes: >> Deferrability is a property of a constraint, not an index > Yes, but creating a unique constraint implicitly creates an index, and > creating a unique index implicitly creates a constraint. No, it doesn't. I'm using "constraint" in a technical sense here, that is somet

Re: [GENERAL] Create a deferrably-unique index

2013-08-19 Thread Paul Jungwirth
> Deferrability is a property of a constraint, not an index Yes, but creating a unique constraint implicitly creates an index, and creating a unique index implicitly creates a constraint. So I'm wondering whether I can create a pair where the index is partial and the constraint is deferrable. It s

Re: [GENERAL] Create a deferrably-unique index

2013-08-19 Thread Tom Lane
Paul Jungwirth 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

[GENERAL] Create a deferrably-unique index

2013-08-19 Thread Paul Jungwirth
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 `cre