Re: Arrays and foreign keys

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Chris <chris(at)bitmead(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Kaare Rasmussen <kar(at)webline(dot)dk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Arrays and foreign keys
Date: 2000-10-12 16:53:18
Message-ID: Pine.BSF.4.10.10010120950440.45823-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I think that was the agreement on the best way to do it (although the
operator is even easier looking, just replace = with whatever the operator
is.). This would mean moving the array code from contrib into the real
source tree probably though, or having the foreign key stuff figure out if
you had it installed and use it only in those cases.

On Fri, 13 Oct 2000, Chris wrote:

> There is some stuff which last time I looked is in contrib that allows
> queries to test if something is in an array. Something vaguely like
> SELECT * from part, box where IN(part.num, box.array).
>
> Having this integrated in the foreign key stuff would certainly be
> important for object databases, which by definition use these kinds of
> arrays.
>
> Bruce Momjian wrote:
> >
> > > > Well, the two types aren't the same (one is an integer the
> > > > other an integer array,) so I wouldn't expect it to work. Note:
> > >
> > > Eh, I could figure that out myself. What I'm asking for is if there is a way to
> > > combine arrays with foreign keys?
> > >
> > > I believe the answer for now is 'no', but did like to get it confirmed, and
> > > also draw attention to this if someone wants to make it.
> > >
> > > > * Make sure that types used in foreign key constraints
> > > > are comparable.
> > >
> > > And maybe
> > > * Add foreign key constraint for arrays
> >
> > Added to TODO.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alfred Perlstein 2000-10-12 17:03:09 Re: Core dump
Previous Message Dan Moschuk 2000-10-12 16:49:25 Core dump