Skip site navigation (1) Skip section navigation (2)

Re: Stored function not accepting null value?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Deirdre Hall" <d(dot)hall(at)delcan(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Stored function not accepting null value?
Date: 2009-04-01 19:01:09
Message-ID: 10034.1238612469@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
"Deirdre Hall" <d(dot)hall(at)delcan(dot)com> writes:
> I am using a stored function to determine whether a table needs an update
> or insert, based on the merge_db function in the postgres documentation.
> (Not currently including it below because it's rather long, but other than
> the fact that it contains 27 values, it's pretty much the same as that
> example.)

Well, not including it is a good way to ensure that no one will really
know what the problem is ... but I wonder whether you declared the
function STRICT.  That'd prevent it from being called with a NULL
argument, which seems to fit the reported behavior.

			regards, tom lane

In response to

Responses

pgsql-sql by date

Next:From: Deirdre HallDate: 2009-04-01 19:20:55
Subject: Re: Stored function not accepting null value?
Previous:From: Deirdre HallDate: 2009-04-01 18:17:30
Subject: Stored function not accepting null value?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group