| От | Tom Lane |
|---|---|
| Тема | Re: Referencing uninitialized variables in plpgsql |
| Дата | |
| Msg-id | 5349.1107713905@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Referencing uninitialized variables in plpgsql ("Karl O. Pinc" <kop@meme.com>) |
| Ответы |
Creating an index-type for LIKE '%value%'
|
| Список | pgsql-general |
"Karl O. Pinc" <kop@meme.com> writes:
> AFICT, the docs arn't clear when it comes to referencing unitialized
> array elements. I assume you get NULL values here as well even
> though other array elements may have been given non-NULL values.
There is no such thing as an uninitialized array element.
Looking at array_ref, we do return a NULL if you try to fetch from a
position outside the current array subscript range. But that's not
"uninitialized" in any normal sense of the word, it's more like
"nonexistent". (I think you're right that it's undocumented behavior,
too.)
> Can I count on this?
Until someone makes an argument to change it ;-).
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера