Re: array exclusion constraint

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Philip Taylor <philiptaylor51(at)yahoo(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: array exclusion constraint
Date: 2012-11-21 20:51:43
Message-ID: CA+TgmoZzmfKEu-k3N=7QjTY9JW74tGw86cL2dBuXRnww9VhJqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 17, 2012 at 1:05 PM, Philip Taylor <philiptaylor51(at)yahoo(dot)com> wrote:
> CREATE TABLE foo (
> x CHAR(32) PRIMARY KEY,
> y CHAR(32) NOT NULL,
> EXCLUDE USING gist ((ARRAY[x, y]) WITH &&)
> );

My first thought was you were going to have better luck with text
rather than char(n), but a little bit of experimentation suggests to
me that that doesn't work either. It seems that GIN doesn't support
exclusion constraints and there's no gist opclass for text[],
varchar[], or anyarray. Bummer.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2012-11-21 21:01:44 Re: PQconninfo function for libpq
Previous Message Andres Freund 2012-11-21 20:41:44 Re: [PATCH] binary heap implementation