Re: [HACKERS] Another nasty cache problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Another nasty cache problem
Date
Msg-id 19021.950544016@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Another nasty cache problem  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Responses Re: [HACKERS] Another nasty cache problem  (Patrick Welche <prlw1@newn.cam.ac.uk>)
List pgsql-hackers
Patrick Welche <prlw1@newn.cam.ac.uk> writes: 
> +       if (!string)
> +               elog(ERROR, "Trying to convert NULL text to integer (int2)");

This is unreasonable behavior.  The correct patch is just
if (!string)    return 0;

which will allow the function manager to plow ahead with returning the
NULL that it's going to return anyway.  See the past pghackers threads
about redesigning the function manager interface if you don't understand
what's going on here.
        regards, tom lane


pgsql-hackers by date:

Previous
From: sszabo@bigpanda.com
Date:
Subject: Limit and Order by stuff
Next
From: Patrick Welche
Date:
Subject: Re: [HACKERS] Another nasty cache problem