Re: Pl/pgsql functions causing crashes in 8.2.2 - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: Pl/pgsql functions causing crashes in 8.2.2
Date
Msg-id e51f66da0702060214m1c3b0a5n47de1fbfa6c21a19@mail.gmail.com
Whole thread Raw
In response to Pl/pgsql functions causing crashes in 8.2.2  ("Jonathan Gray" <jon5pg@streamy.com>)
Responses Re: Pl/pgsql functions causing crashes in 8.2.2  ("Marko Kreen" <markokr@gmail.com>)
List pgsql-hackers
On 2/6/07, Jonathan Gray <jon5pg@streamy.com> wrote:
> Following an upgrade to 8.2.2, many of my plpgsql functions started to cause
> server process crashes.
>
> I make use of a custom data-type "uniqueidentifier", available here:
>
> http://gborg.postgresql.org/project/uniqueidentifier
> ftp://gborg.postgresql.org/pub/uniqueidentifier/stable/uniqueidentifier-0.2.
> tar.gz
>
> This type has given me the same kind of process crash once before, but that
> was related to NULL values in a foreign-key referenced field (unresolved to
> this day, but behavior is allowed for all builtin types).

Indeed, the code can crash on NULL values as the NULL checks
are missing or wrong in the functions.  Actually all the various
functions except newid() should be declared STRICT IMMUTABLE
thus immidiately avoiding problems with NULLs.

Could you reproduce the crash with this change?  I'll try
to play with this myself too.

-- 
marko


pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: Proposed adjustments in MaxTupleSize andtoastthresholds
Next
From: Richard Huxton
Date:
Subject: Re: Referential Integrity and SHARE locks