Thread: pgsql: Remove use_json_as_text options from json_to_record/json_populat

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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a749a23d7af4dba9b3468076ec561d2cbf69af09

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(-)