Re: [HACKERS] NULL as an argument in plpgsql functions

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] NULL as an argument in plpgsql functions
Date: 1999-10-03 06:14:15
Message-ID: 37F6F437.DD915876@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)alumni(dot)caltech(dot)edu
South Pasadena, California

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message D'Arcy J.M. Cain 1999-10-03 08:54:38 Re: [HACKERS] NULL as an argument in plpgsql functions
Previous Message Peter Eisentraut 1999-10-03 05:31:11 Re: [HACKERS] Tricky query, tricky response