Re: wrong inicializied array in plpgsql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: wrong inicializied array in plpgsql
Дата
Msg-id 18677.1063561307@sss.pgh.pa.us
обсуждение исходный текст
Ответ на wrong inicializied array in plpgsql  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Список pgsql-bugs
Pavel Stehule <stehule@kix.fsv.cvut.cz> writes:
> I am testing long array values. I tryed write simple function in plpgsql
> for this. I found maybe a bug. Array in plpgsql without explicit init
> (empty array) don't work;

This isn't a bug; or at least, it's not plpgsql's fault.  The array
variable is initially NULL, same as any other plpgsql variable you
didn't explicitly initialize.  And assigning to an element of a NULL
array yields another NULL array.

Perhaps that behavior should be changed, but I think it would require
making unsupported assumptions about what the user wants...

            regards, tom lane

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: wrong inicializied array in plpgsql
Следующее
От: payman@no_club-internet_spam.fr (Payman)
Дата:
Сообщение: PostgreSql 7.3.4 & 7.4 on MacOS X