pgsql: Add PL/Python functions for quoting strings

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: Add PL/Python functions for quoting strings
Дата
Msg-id E1Ps03C-000791-2H@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Fix a couple of unlogged tables goofs.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Add a relkind field to RangeTblEntry to avoid some syscache look