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

From: Richard Huxton <dev(at)archonet(dot)com>
To: Michal Hlavac <hlavki(at)medium13(dot)sk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ltree bug handling nulls (was Stored procedure failure)
Date: 2004-08-26 10:46:18
Message-ID: 412DBF7A.50006@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Deme 2004-08-26 10:49:18 unsubscribe
Previous Message Michal Hlavac 2004-08-26 10:23:25 Re: Stored procedure failure