Create a function quote_nullable(), which works the same as quote_literal()
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Mar 2008 00:24:20 +0000 (00:24 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Mar 2008 00:24:20 +0000 (00:24 +0000)
commit5a8cf225019ba83c6e6384f008576b5cf20d4208
tree11b0548722b721f45af6c11a07068d74b8dd525d
parent4bc5c7805df22a51947ac83bef50379413741a97
Create a function quote_nullable(), which works the same as quote_literal()
except that it returns the string 'NULL', rather than a SQL null, when called
with a null argument.  This is often a much more useful behavior for
constructing dynamic queries.  Add more discussion to the documentation
about how to use these functions.

Brendan Jurd
doc/src/sgml/func.sgml
doc/src/sgml/plpgsql.sgml
src/backend/utils/adt/quote.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/utils/builtins.h