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

From Jeff Davis
Subject Re: WIP: generalized index constraints
Date
Msg-id 1246992761.26589.218.camel@monkey-cat.sm.truviso.com
Whole thread Raw
In response to Re: WIP: generalized index constraints  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: WIP: generalized index constraints
List pgsql-hackers
On Tue, 2009-07-07 at 18:36 +0100, Simon Riggs wrote:
> On Tue, 2009-07-07 at 13:22 -0400, Tom Lane wrote:
> It is likely to be useful in the future to allow an index with N
> columns, yet which can provide uniqueness with < N of those columns.
> This capability is known as covered indexes and will be important if
> Heikki writes his index-only scan code.

My patch offers this capability, and the language I suggested would
support it.

In the current version of the patch, just use InvalidStrategy (0)
instead of, say, BTEqualStrategyNumber (3) for the attributes that you
don't want to be a part of the constraint. Some of the proper error
checking is not done yet, but it will work.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: information_schema.columns changes needed for OLEDB
Next
From: "David E. Wheeler"
Date:
Subject: Re: Maintenance Policy?