From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Add PL/Python functions for quoting strings |
Date: | 2011-02-22 21:45:42 |
Message-ID: | E1Ps03C-000791-2H@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/1c51c7d5ffd407426f314b2cd317ef77f14efb1f
Modified Files
--------------
doc/src/sgml/plpython.sgml | 17 +++++++
src/backend/utils/adt/quote.c | 6 +-
src/include/utils/builtins.h | 2 +-
src/pl/plpython/Makefile | 1 +
src/pl/plpython/expected/plpython_quote.out | 56 +++++++++++++++++++++++
src/pl/plpython/expected/plpython_test.out | 6 +-
src/pl/plpython/plpython.c | 65 +++++++++++++++++++++++++++
src/pl/plpython/sql/plpython_quote.sql | 33 ++++++++++++++
8 files changed, 179 insertions(+), 7 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-02-23 00:25:25 | pgsql: Add a relkind field to RangeTblEntry to avoid some syscache look |
Previous Message | Robert Haas | 2011-02-22 19:49:19 | pgsql: Fix a couple of unlogged tables goofs. |