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