postgresql/src/backend
Tom Lane 1a2b2034d4 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:31 -05:00
..
access Tweak BRIN minmax operator class 2015-01-22 17:01:09 -03:00
bootstrap Remove some dead IsUnderPostmaster code from bootstrap.c. 2015-01-14 00:37:02 +01:00
catalog Clean up some mess in row-security patches. 2015-01-24 16:16:22 -05:00
commands Fix volatile-safety issue in asyncQueueReadAllNotifications(). 2015-01-26 11:57:33 -05:00
executor Use abbreviated keys for faster sorting of text datums. 2015-01-19 15:28:27 -05:00
foreign Update copyright for 2015 2015-01-06 11:43:47 -05:00
lib Fix typos, update README. 2015-01-23 15:06:53 -05:00
libpq Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
main Always set the six locale category environment variables in main(). 2015-01-07 22:34:57 -05:00
nodes Improve new caching logic in tbm_add_tuples(). 2015-01-16 13:28:30 -05:00
optimizer Fix ancient thinko in default table rowcount estimation. 2015-01-18 17:04:11 -05:00
parser Prevent duplicate escape-string warnings when using pg_stat_statements. 2015-01-22 18:11:00 -05:00
po Translation updates 2014-12-15 00:25:35 -05:00
port Add barriers to the latch code. 2015-01-13 12:58:43 +01:00
postmaster Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
regex Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
replication Further cleanup of ReorderBufferCommit(). 2015-01-25 22:49:56 -05:00
rewrite Clean up some mess in row-security patches. 2015-01-24 16:16:22 -05:00
snowball Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage Fix various shortcomings of the new PrivateRefCount infrastructure. 2015-01-19 23:59:41 +01:00
tcop Add a default local latch for use in signal handlers. 2015-01-14 18:45:22 +01:00
tsearch Update copyright for 2015 2015-01-06 11:43:47 -05:00
utils Fix NUMERIC field access macros to treat NaNs consistently. 2015-01-27 12:06:31 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Update copyright for 2015 2015-01-06 11:43:47 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk xlogreader.c: Fix report_invalid_record translatability flag 2015-01-09 12:34:25 -03:00