Add PL/Python functions for quoting strings
Peter Eisentraut <peter_e@gmx.net>
Add PL/Python functions for quoting strings Add functions plpy.quote_ident, plpy.quote_literal, plpy.quote_nullable, which wrap the equivalent SQL functions. To be able to propagate char * constness properly, make the argument of quote_literal_cstr() const char *. This also makes it more consistent with quote_identifier(). Jan Urbański, reviewed by Hitoshi Harada, some refinements by Peter Eisentraut
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/plpython.sgml | modified | +17 −0 |
| src/backend/utils/adt/quote.c | modified | +3 −3 |
| src/include/utils/builtins.h | modified | +1 −1 |
| src/pl/plpython/expected/plpython_quote.out | added | +56 −0 |
| src/pl/plpython/expected/plpython_test.out | modified | +3 −3 |
| src/pl/plpython/Makefile | modified | +1 −0 |
| src/pl/plpython/plpython.c | modified | +65 −0 |
| src/pl/plpython/sql/plpython_quote.sql | added | +33 −0 |