Fix two small bugs in json's populate_record_worker
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 4 May 2015 16:38:58 +0000 (12:38 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Mon, 4 May 2015 16:38:58 +0000 (12:38 -0400)
commit3c000fd9a68dae9ebd9d1507ab3995cc178de1e5
tree6ef7993c115a0d6443d805e7fc29675cc5515e7a
parentc90b85e4d9e4ae3bc26459cc54697e1adaa4315f
Fix two small bugs in json's populate_record_worker

The first bug is not releasing a tupdesc when doing an early return out
of the function. The second bug is a logic error in choosing when to do
an early return if given an empty jsonb object.

Bug reports from Pavel Stehule and Tom Lane respectively.

Backpatch to 9.4 where these were introduced.
src/backend/utils/adt/jsonfuncs.c