Re: How to deal with NULL values on dynamic queries?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andre Lopes <lopes80andre(at)gmail(dot)com>
Cc: postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to deal with NULL values on dynamic queries?
Date: 2010-05-07 04:47:19
Message-ID: 2396.1273207639@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andre Lopes <lopes80andre(at)gmail(dot)com> writes:
> I have a query that some values could be NULL, how can I deal with this
> problem?

PG 8.4 and up have a function quote_nullable() that would do what I
think you're looking for. On an older version, you could define such a
function for yourself.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sandeep Thakkar 2010-05-07 06:29:07 Getting pgsnmpd using rsync/sup
Previous Message Craig Ringer 2010-05-07 04:06:23 Re: password management