Re: Stored function not accepting null value?

From: "Deirdre Hall" <d(dot)hall(at)delcan(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Stored function not accepting null value?
Date: 2009-04-01 19:20:55
Message-ID: 042101c9b2ff$7fb59120$5062140a@dc06012008
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

And that would be where I went wrong. Thanks.

DHall

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Wednesday, April 01, 2009 2:01 PM
To: Deirdre Hall
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Stored function not accepting null value?

"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
____
This communication may contain information that is confidential, privileged or subject to copyright. If you are not the intended recipient, please advise by return e-mail and delete the message and any attachments immediately without reading, copying or forwarding to others.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Willis 2009-04-01 23:31:20 FUNCTION problem
Previous Message Tom Lane 2009-04-01 19:01:09 Re: Stored function not accepting null value?