Add new SQL function, format(text).
authorRobert Haas <rhaas@postgresql.org>
Sat, 20 Nov 2010 05:21:17 +0000 (00:21 -0500)
committerRobert Haas <rhaas@postgresql.org>
Sun, 21 Nov 2010 03:33:27 +0000 (22:33 -0500)
commit750487077802861a2accd94164166747ec311fa4
treeb698c97272bede25c1ac9698a81f10f0fc0cb6d2
parent89a368418c56125f79f46a81229e824d519f9718
Add new SQL function, format(text).

Currently, three conversion format specifiers are supported: %s for a
string, %L for an SQL literal, and %I for an SQL identifier.  The latter
two are deliberately designed not to overlap with what sprintf() already
supports, in case we want to add more of sprintf()'s functionality here
later.

Patch by Pavel Stehule, heavily revised by me.  Reviewed by Jeff Janes
and, in earlier versions, by Itagaki Takahiro and Tom Lane.
doc/src/sgml/func.sgml
doc/src/sgml/plpgsql.sgml
src/backend/utils/adt/varlena.c
src/include/catalog/pg_proc.h
src/include/utils/builtins.h
src/test/regress/expected/text.out
src/test/regress/sql/text.sql