Array elem as foreign key?

Поиск
Список
Период
Сортировка
От Gan Uesli Starling
Тема Array elem as foreign key?
Дата
Msg-id 20051020200004.2223.qmail@mail_102.selectedhosting.com
обсуждение исходный текст
Ответы Re: Array elem as foreign key?  (Oliver Elphick <olly@lfix.co.uk>)
Список 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 по дате отправления:

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: SQL return value...
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: Array elem as foreign key?