Re: EXECUTE with a prepared plan and NULL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "sergey kapustin" <kapustin(dot)sergey(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: EXECUTE with a prepared plan and NULL
Date: 2009-01-04 23:04:45
Message-ID: 888.1231110285@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"sergey kapustin" <kapustin(dot)sergey(at)gmail(dot)com> writes:
> The thing is, that if i one of the parameters is NULL, then string s becomes
> NULL also ( because NULL||"any string" = NULL) and as a result i get this
> error -
> ERROR: cannot EXECUTE a null querystring

quote_nullable() might help.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Browne 2009-01-05 17:06:49 Re: Any utility to convert MySQL to PGSQL?
Previous Message Adrian Klaver 2009-01-04 21:04:37 Re: How to excute dynamically a generated SQL command?