]> granicus.if.org Git - postgresql/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:27 +0000 (19:06 -0500)
commit24688f4e5a7d5fadde0e43a5b123432d81577d82
tree8d42cf1bbf30e59ea8461464c9ecec625d02fd1c
parente39250c644ea7cd3904e4e24570db21a209cf97f
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