Re: Bug in triggers

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Bug in triggers
Дата
Msg-id 603c8f071003090632g340ac949v796e70c702387b60@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bug in triggers  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Bug in triggers
Список pgsql-bugs
On Sun, Mar 7, 2010 at 12:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Fri, Mar 5, 2010 at 5:32 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> It's arguably a bug, but since we lack consensus on whether NULL and
>>> ROW(NULL,NULL,...) are the same thing, it's difficult to make a
>>> bulletproof case either way.
>
>> Have we or can we somehow document why this happens?
>
> The reason it happens is that the assignment target is a "row" variable,
> meaning that it doesn't have concrete existence as a tuple but is just
> an alias for a list of scalar variables. =A0So there is no way for it to
> represent an atomic NULL; setting each of the individual scalars to NULL
> is possible but the result acts more like ROW(NULL,NULL,...).
>
> I'm not sure about documenting that. =A0It seems like an implementation
> detail. =A0If we had consensus that the two cases either should or should
> not be distinguishable, we could work towards making that happen; but
> lacking such consensus I'm hesitant to touch it at all.

What seems odd to me is that NEW is apparently some other kind of
thing that is not the same kind of thing as the row variable.

...Robert

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

Предыдущее
От: Andrea Suisani
Дата:
Сообщение: duplicate key violates unique contraint on pg_type_typname_nsp_index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug in triggers