]> granicus.if.org Git - postgresql/commit
Process variadic arguments consistently in json functions
authorAndrew Dunstan <andrew@dunslane.net>
Wed, 25 Oct 2017 11:34:00 +0000 (07:34 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Wed, 25 Oct 2017 11:48:36 +0000 (07:48 -0400)
commit98efa5ebf0b44d9b5ac7ba0dccff3e4870b4d3c9
treecd862caedd0d1c241b747e98105aa63e20914f22
parent5c3a1bbb4778c9a4db6982e1f54add3164c81488
Process variadic arguments consistently in json functions

json_build_object and json_build_array and the jsonb equivalents did not
correctly process explicit VARIADIC arguments. They are modified to use
the new extract_variadic_args() utility function which abstracts away
the details of the call method.

Michael Paquier, reviewed by Tom Lane and Dmitry Dolgov.

Backpatch to 9.5 for the jsonb fixes and 9.4 for the json fixes, as
that's where they originated.
src/backend/utils/adt/json.c
src/backend/utils/adt/jsonb.c
src/test/regress/expected/json.out
src/test/regress/expected/jsonb.out
src/test/regress/sql/json.sql
src/test/regress/sql/jsonb.sql