Create a function quote_nullable(), which works the same as quote_literal()
Tom Lane <tgl@sss.pgh.pa.us>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +35 −1 |
| doc/src/sgml/plpgsql.sgml | modified | +73 −21 |
| src/backend/utils/adt/quote.c | modified | +17 −1 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_proc.h | modified | +5 −1 |
| src/include/utils/builtins.h | modified | +2 −1 |