Re: [HACKERS] NULL as an argument in plpgsql functions - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: [HACKERS] NULL as an argument in plpgsql functions
Date
Msg-id 37F6F437.DD915876@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] NULL as an argument in plpgsql functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] NULL as an argument in plpgsql functions
Re: [HACKERS] NULL as an argument in plpgsql functions
List pgsql-hackers
> probably be better to mark the Const node as having type UNKNOWN instead
> of type 0 (but make_const is not the only place that makes null
> constants this way! we'd need to find all the others...).  But I am not
> sure whether ParseFuncOrColumn would then do the right thing in terms of
> resolving the type of the function; for that matter I'm not real sure
> what the right thing for it to do is.
> Thomas, this stuff is mostly your bailiwick; what do you think?

My recollection is that UNKNOWN usually applies to strings of
unspecified type, while "0" applies to NULL fields. I can put this on
my list to look at later.

Another side issue; any function called with a null parameter will
actually not get called at all! Postgres assumes that a function
called with null must return null, so doesn't bother calling the
routine...
                   - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: 'iscachable' only partially solves premature constant coercion
Next
From: "D'Arcy" "J.M." Cain
Date:
Subject: Re: [HACKERS] NULL as an argument in plpgsql functions