pgsql: Fix minor thinko in convertToJsonb().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix minor thinko in convertToJsonb().
Date: 2014-12-11 00:07:20
Message-ID: E1XyrHs-0000Uy-7r@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/24688f4e5a7d5fadde0e43a5b123432d81577d82

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

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2014-12-11 01:57:51 pgsql: Fix typo
Previous Message Petr Jelinek 2014-12-10 15:03:18 Re: [COMMITTERS] pgsql: Keep track of transaction commit timestamps