pgsql: Remove use_json_as_text options from json_to_record/json_populat

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Remove use_json_as_text options from json_to_record/json_populat
Дата
Msg-id E1X1JFu-0003BD-4M@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Remove use_json_as_text options from json_to_record/json_populate_record.

The "false" case was really quite useless since all it did was to throw
an error; a definition not helped in the least by making it the default.
Instead let's just have the "true" case, which emits nested objects and
arrays in JSON syntax.  We might later want to provide the ability to
emit sub-objects in Postgres record or array syntax, but we'd be best off
to drive that off a check of the target field datatype, not a separate
argument.

For the functions newly added in 9.4, we can just remove the flag arguments
outright.  We can't do that for json_populate_record[set], which already
existed in 9.3, but we can ignore the argument and always behave as if it
were "true".  It helps that the flag arguments were optional and not
documented in any useful fashion anyway.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3130b8505ffcc3dae053939824c72291f6cdff3b

Modified Files
--------------
doc/src/sgml/func.sgml                |   26 +++++++-------
src/backend/catalog/system_views.sql  |   26 ++------------
src/backend/utils/adt/jsonfuncs.c     |   60 ++++-----------------------------
src/include/catalog/catversion.h      |    2 +-
src/include/catalog/pg_proc.h         |   14 ++++----
src/test/regress/expected/json.out    |   40 +++++++++++-----------
src/test/regress/expected/json_1.out  |   40 +++++++++++-----------
src/test/regress/expected/jsonb.out   |   36 ++++++++++----------
src/test/regress/expected/jsonb_1.out |   36 ++++++++++----------
src/test/regress/sql/json.sql         |   33 +++++++++---------
src/test/regress/sql/jsonb.sql        |   28 +++++++--------
11 files changed, 136 insertions(+), 205 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Remove use_json_as_text options from json_to_record/json_populat
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix and enhance the assertion of no palloc's in a critical secti