Re: [SQL] Array Madness

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Array Madness
Дата
Msg-id 16388.937321333@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Array Madness  (Michael Richards <miker@scifair.acadiau.ca>)
Ответы Re: [SQL] Array Madness  (Michael Richards <miker@scifair.acadiau.ca>)
Список pgsql-sql
Michael Richards <miker@scifair.acadiau.ca> writes:
> It seems that you can't have a NULL value in an array.

Seems like a reasonable idea.  Go for it...

> Running an update and setting a single array value to null seems
> to nuke the entire array.

Yeah, it does, see ExecEvalArrayRef() in execQual.c: if the refassgnexpr
yields a null, it just drops out with a null result for the whole expr.
This could be fixed if the array routines had a representation for a
null element in an array, but they don't.

In the meantime, perhaps it would be better for ExecEvalArrayRef() to
raise an error if the assign source is null, rather than dropping the
whole contents of the array.  Comments?
        regards, tom lane


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

Предыдущее
От: raptor
Дата:
Сообщение: Long story !!! Please HELP !!!
Следующее
От: Michael Richards
Дата:
Сообщение: Re: [SQL] Array Madness