]> 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:52:45 +0000 (07:52 -0400)
commit9cb28e98b818288b70f165d08ddd295b799466c2
tree79ef37843aaa6da9ae58712de38a46c2a2409be3
parent7f89fc418223d7bfe5cafd5b781a84332954f82a
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/test/regress/expected/json.out
src/test/regress/sql/json.sql