Array elem as foreign key? - Mailing list pgsql-novice

From Gan Uesli Starling
Subject Array elem as foreign key?
Date
Msg-id 20051020200004.2223.qmail@mail_102.selectedhosting.com
Whole thread Raw
Responses Re: Array elem as foreign key?
List pgsql-novice
Howdy,

I have two tables, thus (sans non-relevent cols)....

 -- Associate to a computer in the 'computers' table.
CREATE TABLE softwares (
 id SERIAL PRIMARY KEY,
 -- more cols after
);

CREATE TABLE computers (
 --some cols before
 softwares INTEGER[10],
 --more cols after
);
COMMENT ON COLUMN computers.softwares IS '0th elem = OS. 1st-Nth = Any SW';

...and I'd like each elem of computers.sofwares
to reference softwares.id (or be NULL) but my
several attempts to date have been rejected.

Is there a way to do this? If so, how?

TIA,

 --
Mistera Sturno - Rarest Extinct Bird

<(+)__        Gan Uesli Starling
 ((__/)=-    Kalamazoo, MI, USA
  `||`
   ++        http://starling.us

pgsql-novice by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: SQL return value...
Next
From: Oliver Elphick
Date:
Subject: Re: Array elem as foreign key?