Re: Foreign key constraint for array-field?

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: dmitry(at)koterov(dot)ru, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Foreign key constraint for array-field?
Date: 2008-09-21 20:11:12
Message-ID: 1222027872.4445.107.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Sun, 2008-09-21 at 15:07 -0400, Andrew Dunstan wrote:
>
> Simon Riggs wrote:
> > No, its not possible. Need a trigger.
> >
> > I think we should support it though. If we extend the relational model
> > with arrays then it would be sensible if we support this aspect as
> > well.
> >
> > Implementation would be fairly straightforward. ri_triggers currently
> > assumes a non-array value is being checked, but that could be changed to
> > IN(array). Multi-column keys with arrays sound confusing though.
> >
>
> What's the syntax going to look like?

The ALTER TABLE would have exactly the same syntax.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2008-09-21 20:11:36 Re: [patch] fix dblink security hole
Previous Message Dmitry Koterov 2008-09-21 20:03:23 Re: Predictable order of SQL commands in pg_dump