| From: | "Gan Uesli Starling" <alias(at)starling(dot)us> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Array elem as foreign key? |
| Date: | 2005-10-20 20:00:04 |
| Message-ID: | 20051020200004.2223.qmail@mail_102.selectedhosting.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Galliker Armin | 2005-10-20 21:14:43 | store images in a database? |
| Previous Message | Richard Huxton | 2005-10-20 07:34:23 | Re: SQL return value... |