]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix minor thinko in convertToJsonb().
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 11 Dec 2014 00:06:27 +0000 (19:06 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 11 Dec 2014 00:06:39 +0000 (19:06 -0500)
commit49b60a4be7cb8bbfb9d954cc5b81d0dc18b077df
tree649ddc9ca5ace5d2d3c8af8e0b5ddd74b76347eb
parenteadd80c08ddfc485db84b9af7cca54a0d50ebe6d
Fix minor thinko in convertToJsonb().

The amount of space to reserve for the value's varlena header is
VARHDRSZ, not sizeof(VARHDRSZ).  The latter coding accidentally
failed to fail because of the way the VARHDRSZ macro is currently
defined; but if we ever change it to return size_t (as one might
reasonably expect it to do), convertToJsonb() would have failed.

Spotted by Mark Dilger.
src/backend/utils/adt/jsonb_util.c