concatenation operator || with "null" array

Поиск
Список
Период
Сортировка
От stroncococcus
Тема concatenation operator || with "null" array
Дата
Msg-id 1165444988.517457.228040@l12g2000cwl.googlegroups.com
обсуждение исходный текст
Ответы Re: concatenation operator || with "null" array  ("stroncococcus" <stroncococcus@gmx.de>)
Re: concatenation operator || with "null" array  ("Brandon Aiken" <BAiken@winemantech.com>)
Re: concatenation operator || with "null" array  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-general
Hello!

When I try to fill an array with the concatenation operator, like
UPDATE test SET myint = myint || ARRAY[123] WHERE id = 1
that before that statement was null, then it is also null after that
statement.
But if there is already something in that array and I execute that
statement, then everything works fine and one can find the 123 there,
too.
Is this the normal behavior? Is there a way to "concatenate" to null
arrays as well, or do I have to test this inside my script, and if it
is null fill it normal for the first time?

Best regards,
Kai


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

Предыдущее
От: "BigSmoke"
Дата:
Сообщение: The relative stability of different procedural languages
Следующее
От: "stroncococcus"
Дата:
Сообщение: Re: concatenation operator || with "null" array