pgsql: Fix minor thinko in convertToJsonb(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix minor thinko in convertToJsonb().
Date
Msg-id E1XyrHs-0000Uz-7w@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/49b60a4be7cb8bbfb9d954cc5b81d0dc18b077df

Modified Files
--------------
src/backend/utils/adt/jsonb_util.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix minor thinko in convertToJsonb().
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Fix typo