postgresql/src/backend/utils
Tom Lane 3d5e857ab1 Fix NUMERIC field access macros to treat NaNs consistently.
Commit 145343534c arranged to store numeric
NaN values as short-header numerics, but the field access macros did not
get the memo: they thought only "SHORT" numerics have short headers.

Most of the time this makes no difference because we don't access the
weight or dscale of a NaN; but numeric_send does that.  As pointed out
by Andrew Gierth, this led to fetching uninitialized bytes.

AFAICS this could not have any worse consequences than that; in particular,
an unaligned stored numeric would have been detoasted by PG_GETARG_NUMERIC,
so that there's no risk of a fetch off the end of memory.  Still, the code
is wrong on its own terms, and it's not hard to foresee future changes that
might expose us to real risks.  So back-patch to all affected branches.
2015-01-27 12:06:36 -05:00
..
adt Fix NUMERIC field access macros to treat NaNs consistently. 2015-01-27 12:06:36 -05:00
cache Correctly handle relcache invalidation corner case during logical decoding. 2015-01-07 00:24:58 +01:00
error Use correct text domain for errcontext() appearing within ereport(). 2015-01-12 12:40:30 -05:00
fmgr pgindent run for 9.4 2014-05-06 12:12:18 -04:00
hash pgindent run for 9.4 2014-05-06 12:12:18 -04:00
init Include SSL compression status in psql banner and connection logging 2014-07-15 15:12:13 +02:00
mb pgindent run for 9.4 2014-05-06 12:12:18 -04:00
misc Clean up assorted issues in ALTER SYSTEM coding. 2015-01-25 20:19:07 -05:00
mmgr Revert the assertion of no palloc's in critical section. 2014-06-30 10:25:05 +03:00
resowner pgindent run for 9.4 2014-05-06 12:12:18 -04:00
sort Improve tuplestore's error messages for I/O failures. 2014-06-12 18:59:14 -04:00
time Fix longstanding bug in HeapTupleSatisfiesVacuum(). 2014-06-04 21:36:19 +02:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
errcodes.txt Update copyright for 2014 2014-01-07 16:05:30 -05:00
Gen_dummy_probes.sed Update copyright for 2014 2014-01-07 16:05:30 -05:00
Gen_fmgrtab.pl Update copyright for 2014 2014-01-07 16:05:30 -05:00
generate-errcodes.pl Update copyright for 2014 2014-01-07 16:05:30 -05:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
probes.d Fix build with LWLOCK_STATS or dtrace. 2014-03-21 23:26:34 +01:00