Re: Pgsql dynamic statements and null values

From: Ragnar Hafstað <gnari(at)simnet(dot)is>
To: Guy Rouillier <guyr(at)masergy(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Pgsql dynamic statements and null values
Date: 2005-03-09 08:31:53
Message-ID: 1110357113.12057.0.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2005-03-08 at 16:30 -0600, Guy Rouillier wrote:
> We use a dynamic statement in a pgsql stored function to insert rows
> into a table determined at run time. After much debugging, I've
> discovered that a null incoming argument will cause the dynamic
> statement to evaluate to null. The error message emitted is "unable to
> execute null statement."

can't you use COALESCE() ?

gnari

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marco Colombo 2005-03-09 09:27:34 Re: postgresql vs mysql performance comparison
Previous Message Richard Huxton 2005-03-09 08:23:45 Re: Can't delete - Need cascading update instead