Re: WIP: generalized index constraints

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Brendan Jurd <direvus(at)gmail(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: generalized index constraints
Date: 2009-09-15 17:28:28
Message-ID: 1253035708.24770.88.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2009-09-15 at 13:16 -0400, Robert Haas wrote:
> Uhh.... so what happens if I create an index constraint using the
> +(integer, integer) operator?

You can use any operator that has an index search strategy. Overlaps is
probably the most useful, but you could imagine other operators, like a
bi-directional containment operator (either LHS is contained in RHS, or
vice-versa).

You can also get creative and have a "similarity" operator that
determines whether two tuples are "too similar". As long as it is
symmetric, the feature will work.

Or just use wrap random() in an operator and see what happens ;)

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2009-09-15 17:30:15 Re: Timestamp to time_t
Previous Message Brendan Jurd 2009-09-15 17:21:54 Re: WIP: generalized index constraints