Re: array[10]
От | Joe Conway |
---|---|
Тема | Re: array[10] |
Дата | |
Msg-id | 3F392ACE.1020201@joeconway.com обсуждение исходный текст |
Ответ на | array[10] (Marco Kaerger <m.kaerger@vitrado.de>) |
Список | pgsql-admin |
Marco Kaerger wrote: > hi there, > > i have got a problem concerning arrays in postgres > i created a function in which i want to know if the index 8 of var_array > ist not NULL: > > IF var_array[8] IS NOT NULL > > THEN > > (query) > > END IF; > > > then i call the function and the query is submitted, allthough > var_array[8] is 'NULL' > From your question it appears that you think 'NULL' (with single quotes) and NULL (without single quotes) are the same thing -- they are not. The string literal 'NULL' is nothing more than a four letter string. NULL, on the other hand, is a special value meaning that the data is unknown. Currently Postgres does not even support NULL elements in arrays, although if you test for a non-existing subscript the result is NULL. Why don't you give us a complete (i.e. the entire function) example of what you are trying to do, along with the specific query you believe gives the wrong result, and then maybe we can be of more help. Joe
В списке pgsql-admin по дате отправления: