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

From Jeff Davis
Subject Re: WIP: generalized index constraints
Date
Msg-id 1253119552.24770.203.camel@jdavis
Whole thread Raw
In response to Re: WIP: generalized index constraints  (tomas@tuxteam.de)
Responses Re: WIP: generalized index constraints
List pgsql-hackers
On Wed, 2009-09-16 at 15:11 +0200, tomas@tuxteam.de wrote:
> One question: does the operator have to be reflexive? I.e. "A op A holds
> for all A"?

I don't think that reflexivity is a strict requirement. You could make
this a constraint over a boolean attribute such that false conflicts
with true and true conflicts with false. That would mean that your table
would have to consist of either all false or all true.

> I am thinking "proximity" or as you state above "similarity". May be
> this is a good metaphor, leading to a good name.

That's an interesting idea: "proximity constraint". I like it because
(a) "proximity" might reasonably be considered a more general form of
the word "unique", which might satisfy Peter's argument; (b) it conveys
the use case; and (c) it sounds good.

There are a couple bizarre cases where "proximity" doesn't quite fit,
like my boolean example above, but I'm OK with that.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Steve Prentice
Date:
Subject: Re: PATCH: make plpgsql IN args mutable (v1) [REVIEW]
Next
From: "Kevin Grittner"
Date:
Subject: Re: Linux LSB init script