Fix minor thinko in convertToJsonb().

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 49b60a4be7cb8bbfb9d954cc5b81d0dc18b077df
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2014-12-11T00:06:39Z
Releases: 9.4.0
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.

Files

PathChange+/−
src/backend/utils/adt/jsonb_util.c modified +1 −1