postgresql/src/backend
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
..
access Fix thinko in re-setting wal_log_hints flag from a parameter-change record. 2015-01-15 20:52:18 +02:00
bootstrap Fix off-by-one loop count in MapArrayTypeName, and get rid of static array. 2014-12-16 15:35:36 -05:00
catalog Fix dependency searching for case where column is visited before table. 2014-11-11 17:00:18 -05:00
commands Fix volatile-safety issue in asyncQueueReadAllNotifications(). 2015-01-26 11:57:36 -05:00
executor Fix use-of-already-freed-memory problem in EvalPlanQual processing. 2015-01-15 18:53:05 -05:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib Misc comment typo fixes. 2014-12-16 16:38:20 +02:00
libpq Fix poorly worded error message. 2014-12-17 13:14:57 -05:00
main Always set the six locale category environment variables in main(). 2015-01-07 22:35:09 -05:00
nodes Avoid core dump in _outPathInfo() for Path without a parent RelOptInfo. 2014-10-17 22:33:04 -04:00
optimizer Fix planning of SELECT FOR UPDATE on child table with partial index. 2014-12-11 21:02:28 -05:00
parser Explicitly support the case that a plancache's raw_parse_tree is NULL. 2014-11-12 15:59:06 -05:00
po Fix trailing whitespace in PO file 2014-12-31 14:19:13 -05:00
port Fix spinlock implementation for some !solaris sparc platforms. 2014-09-09 23:36:32 +02:00
postmaster Adjust "pgstat wait timeout" message to be a translatable LOG message. 2015-01-19 23:01:36 -05:00
regex Fix incorrect search for "x?" style matches in creviterdissect(). 2014-09-23 20:26:21 -04:00
replication Further cleanup of ReorderBufferCommit(). 2015-01-25 22:49:59 -05:00
rewrite Assorted message improvements 2014-08-29 00:01:34 -04:00
snowball Fix ancient encoding error in hungarian.stop. 2014-06-10 22:48:31 -04:00
storage Skip dead backends in MinimumActiveBackends 2015-01-12 11:32:04 -05:00
tcop Explicitly support the case that a plancache's raw_parse_tree is NULL. 2014-11-12 15:59:06 -05:00
tsearch Cope with more than 64K phrases in a thesaurus dictionary. 2014-11-06 20:52:47 -05:00
utils Fix NUMERIC field access macros to treat NaNs consistently. 2015-01-27 12:06:36 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Get rid of use of dlltool in Mingw builds. 2014-02-11 12:56:20 -05:00
nls.mk xlogreader.c: Fix report_invalid_record translatability flag 2015-01-09 12:34:25 -03:00