On 8/18/2004 12:18 PM, Tom Lane wrote:
> Richard Huxton <dev@archonet.com> writes:
>> * Allow multiple unique constraints to share an index where one is a
>> superset of the others' columns.
>
>> That way you can mark it unique without having the overhead of multiple
>> indexes.
>
> That just moves the uncertain-dependency problem over one spot, ie, it's
> the fabricated unique constraint that you can't pin down the
> requirements for.
If we allow for a unique index, that
* it is NOT maintained (no index tuples in there) * depends on another index that has a subset of columns *
ifthat subset-index is dropped, the index becomes maintained
then the uncertainty is gone. At the time someone drops the other
constraint or unique index, the data is unique with respect to the
superset of columns. So building the unique index data at that time will
succeed.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #