Re: ltree bug handling nulls (was Stored procedure failure)

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: ltree bug handling nulls (was Stored procedure failure)
Дата
Msg-id 412DBF7A.50006@archonet.com
обсуждение исходный текст
Ответ на Re: Stored procedure failure  (Michal Hlavac <hlavki@medium13.sk>)
Список pgsql-general
Michal Hlavac wrote:
> Richard Huxton wrote:
>
>>
>> Looking at the 8.0beta source, the functions (...ltree_isparent) are
>> all marked strict so they should just return null on a null parameter.
>>
>> What happens if you set my_path to some non-null but un-matched value
>> before the problem line?
>>
>
> When my_path have non-null value, everything is OK...
>
> I don't understand why one null value would crash the server???

Because it attempts to follow a pointer that isn't there.

If you installed from source, can you check contrib/ltree/ltree.sql.in
and check the "isstrict" attribute is set:
   CREATE FUNCTION ltree_isparent(ltree,ltree)
   RETURNS bool
   AS 'MODULE_PATHNAME'
   LANGUAGE 'C' WITH (isstrict,iscachable);

If it is, then you'll have to wait for a developer to take an interest,
I'm stumped. Shouldn't take long, but if you wanted to be thorough you
could report a bug via the bugs mailing list or the website.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Daniel Schuchardt
Дата:
Сообщение: Trigger question
Следующее
От: "Robert Deme"
Дата:
Сообщение: unsubscribe