Re: Foreign key constraint for array-field?

Поиск
Список
Период
Сортировка
От Dmitry Koterov
Тема Re: Foreign key constraint for array-field?
Дата
Msg-id d7df81620809211149p62801b73i80f33cda424b0126@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Foreign key constraint for array-field?  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: Foreign key constraint for array-field?
Список pgsql-hackers
Normalization is not a panacea here. Sometimes such normalization
creates too much overeat and a lot of additional code (especially if
there are a lot of such dependencies). Array support in Postgres is
quite handy; in my practive, moving from a_b_map to arrays economizes
hundreds of lines of stored procedure and calling application code.

Triggers are not very helpful here, because it is too boringly to
control that all needed tables has appropriate triggers (we need N + 1
triggers with unique code, where N is the number of referring tables).

So, built-in support looks much more interesting...

On Sun, Sep 21, 2008 at 8:46 AM, Joshua D. Drake <jd@commandprompt.com> wrote:
> David Fetter wrote:
>>
>> On Sun, Sep 21, 2008 at 04:38:56AM +0400, Dmitry Koterov wrote:
>>>
>>> Hello.
>>>
>>> Is it possible to create a foreign key constraint for ALL elements of
>>> an array field?
>>
>> Whether it's possible or not--it probably is--it's a very bad idea.
>> Just normalize :)
>
> +1
>
>>
>> Cheers,
>> David.
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: pg_settings.sourcefile patch is a security breach
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Foreign key constraint for array-field?