Re: foreign keys as arrays

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: foreign keys as arrays
Дата
Msg-id Pine.BSF.4.21.0012201041240.82408-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на foreign keys as arrays  ("Alan Young" <alany@qwest.net>)
Список pgsql-general
On Wed, 20 Dec 2000, Alan Young wrote:

> Is there a way I can do something like the following?

Not really this way.  We've talked about possibly at some
point allowing this as an extension to the spec on foreign
keys, but there are some behavioral things that we haven't
really figured out (what if the key isn't a single value
and you want a two dimensional array with key sets in an
array, etc...)

> create table t1 (
> t1id serial,
> );
>
> create table t2 (
> t1id int[] references t1 (t1id)
> );
>
> I know this doesn't work because I get an error message when trying to
> insert into t2.
>
> I'd like to be able allow multiple references if possible.  Has anyone found
> a way to make this work?
>
> Also, how do I update an array field?
>
> For example, t2.t1id = '{1,2,3}' and I want to add 4 to make it t2.t1id =
> '{1,2,3,4}'.


В списке pgsql-general по дате отправления:

Предыдущее
От: Robert Dege
Дата:
Сообщение: Re: Odd files
Следующее
От: Marc SCHAEFER
Дата:
Сообщение: Re: Re: [ADMIN] Help me for "DBI->connect failed: Sorry, too many clients already."