Re: arrays of foreign keys

From: Michael Glaesemann <grzm(at)seespotcode(dot)net>
To: Max <mlavenne(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: arrays of foreign keys
Date: 2007-09-10 12:49:57
Message-ID: 08D6AF7A-52ED-40DC-8004-CA02753EEF2D@seespotcode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Sep 7, 2007, at 18:47 , Max wrote:

> I am trying to create a table with an array containing foreign keys.
> I've searched through the documentation and couldn't find a way to do
> so.

It's because this is not how relational databases are designed to
work. From the server's point of view, an array is an opaque
structure, to be treated as a whole. You're working against the
system here.

> I know I can solve my problem with the following table:

And this is how you should do it.

Michael Glaesemann
grzm seespotcode net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rodrigo De León 2007-09-10 13:00:56 Re: audit sql queries
Previous Message David Fetter 2007-09-10 12:44:11 Re: arrays of foreign keys