Re: WIP: generalized index constraints - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: WIP: generalized index constraints
Date
Msg-id 1247790325.5902.121.camel@monkey-cat.sm.truviso.com
Whole thread Raw
In response to Re: WIP: generalized index constraints  (Brendan Jurd <direvus@gmail.com>)
List pgsql-hackers
On Fri, 2009-07-17 at 09:51 +1000, Brendan Jurd wrote:
> I like that idea ... although how would this interact (if at all) with
> the existing pg_index.isunique flag?  Would it become deprecated in
> favour of using indconstrats, or would you actually look at switching
> isunique to TRUE if somebody applies a constraint which is made up
> entirely of equality ops?

If this ALTER TABLE ADD UNIQUE ... USING syntax is really shorthand for
my special index constraints, it would probably have to use the general
mechanism. Otherwise there would be no way to use the general mechanism
over a btree, which I think should be possible (if nothing else it would
be good to allow apples-to-apples performance testing of my patch).

But I guess it doesn't have to be directly shorthand, ALTER TABLE ADD
UNIQUE ... USING could choose to turn an existing index unique when
possible (e.g. btree), otherwise use the general mechanism.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: [PATCH] [v8.5] Security checks on largeobjects
Next
From: Robert Haas
Date:
Subject: Re: Docbook toolchain interfering with patch review?