Remove use_json_as_text options from json_to_record/json_populate_record.
authorTom Lane <[email protected]>
Sun, 29 Jun 2014 17:51:02 +0000 (13:51 -0400)
committerTom Lane <[email protected]>
Sun, 29 Jun 2014 17:51:02 +0000 (13:51 -0400)
commit3130b8505ffcc3dae053939824c72291f6cdff3b
tree5bc24e388e8d1800d6e3809bb2cd798f15898644
parent56f86bb764bb99a32810c52976926f85cc3bf3b1
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.
doc/src/sgml/func.sgml
src/backend/catalog/system_views.sql
src/backend/utils/adt/jsonfuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/test/regress/expected/json.out
src/test/regress/expected/json_1.out
src/test/regress/expected/jsonb.out
src/test/regress/expected/jsonb_1.out
src/test/regress/sql/json.sql
src/test/regress/sql/jsonb.sql