pgsql: hash_any returns Datum, not uint32 (and definitely not "int").

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: hash_any returns Datum, not uint32 (and definitely not "int").
Date: 2014-05-07 02:49:46
Message-ID: E1WhrvW-0001uu-Q8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

hash_any returns Datum, not uint32 (and definitely not "int").

The coding in JsonbHashScalarValue might have accidentally failed to fail
given current representational choices, but the key word there would be
"accidental". Insert the appropriate datatype conversion macro. And
use the right conversion macro for hash_numeric's result, too.

In passing make the code a bit cleaner and less repetitive by factoring
out the xor step from the switch.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/2c22afaa4e29cbd773bae3f043a941f82ff30e2d

Modified Files
--------------
src/backend/utils/adt/jsonb_util.c | 43 +++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 20 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2014-05-07 02:54:47 pgsql: Fix interval test, which was broken for floating-point timestamp
Previous Message Jeff Davis 2014-05-07 02:27:59 pgsql: Improve comment for tricky aspect of index-only scans.