postgresql/src/include
Tom Lane 66f7e40812 Fix assorted fallout from IS [NOT] NULL patch.
Commits 4452000f3 et al established semantics for NullTest.argisrow that
are a bit different from its initial conception: rather than being merely
a cache of whether we've determined the input to have composite type,
the flag now has the further meaning that we should apply field-by-field
testing as per the standard's definition of IS [NOT] NULL.  If argisrow
is false and yet the input has composite type, the construct instead has
the semantics of IS [NOT] DISTINCT FROM NULL.  Update the comments in
primnodes.h to clarify this, and fix ruleutils.c and deparse.c to print
such cases correctly.  In the case of ruleutils.c, this merely results in
cosmetic changes in EXPLAIN output, since the case can't currently arise
in stored rules.  However, it represents a live bug for deparse.c, which
would formerly have sent a remote query that had semantics different
from the local behavior.  (From the user's standpoint, this means that
testing a remote nested-composite column for null-ness could have had
unexpected recursive behavior much like that fixed in 4452000f3.)

In a related but somewhat independent fix, make plancat.c set argisrow
to false in all NullTest expressions constructed to represent "attnotnull"
constructs.  Since attnotnull is actually enforced as a simple null-value
check, this is a more accurate representation of the semantics; we were
previously overpromising what it meant for composite columns, which might
possibly lead to incorrect planner optimizations.  (It seems that what the
SQL spec expects a NOT NULL constraint to mean is an IS NOT NULL test, so
arguably we are violating the spec and should fix attnotnull to do the
other thing.  If we ever do, this part should get reverted.)

Back-patch, same as the previous commit.

Discussion: <10682.1469566308@sss.pgh.pa.us>
2016-07-28 16:09:15 -04:00
..
access Fix handling of multixacts predating pg_upgrade 2016-06-24 18:29:28 -04: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 Clarify documentation of ceil/ceiling/floor functions. 2016-06-09 11:58:00 -04:00
commands Rework internals of changing a type's ownership 2015-12-21 19:49:15 -03:00
common Add pg_string_endswith as the start of a string helper library in src/common. 2015-01-03 20:54:13 +01:00
datatype pgindent run for 9.4 2014-05-06 12:12:18 -04:00
executor Fix latent crash in do_text_output_multiline(). 2016-05-23 14:16:41 -04:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib pgindent run for 9.4 2014-05-06 12:12:18 -04:00
libpq Fix incorrect order of lock file removal and failure to close() sockets. 2015-08-02 14:55:05 -04:00
mb pgindent run for 9.4 2014-05-06 12:12:18 -04:00
nodes Fix assorted fallout from IS [NOT] NULL patch. 2016-07-28 16:09:15 -04:00
optimizer Fix mishandling of equivalence-class tests in parameterized plans. 2016-04-29 20:19:38 -04:00
parser pgindent run for 9.4 2014-05-06 12:12:18 -04:00
port Improve TranslateSocketError() to handle more Windows error codes. 2016-04-21 16:59:04 -04:00
portability pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postmaster When a background worker exists with code 0, unregister it. 2014-05-07 17:44:42 -04:00
regex Suppress compiler warnings about useless comparison of unsigned to zero. 2016-02-15 17:11:52 -05:00
replication logical decoding: Fix handling of large old tuples with replica identity full. 2016-03-05 18:02:20 -08:00
rewrite pgindent run for 9.4 2014-05-06 12:12:18 -04:00
snowball pgindent run for 9.4 2014-05-06 12:12:18 -04:00
storage Introduce durable_rename() and durable_link_or_rename(). 2016-03-09 18:53:54 -08:00
tcop Be more careful to not lose sync in the FE/BE protocol. 2015-02-02 17:09:46 +02:00
tsearch Allow opclasses to provide tri-valued GIN consistent functions. 2014-03-12 17:51:30 +02:00
utils Fix GiST index build for NaN values in geometric types. 2016-07-14 18:46:00 -04:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
fmgr.h Redesign API presented by nodeAgg.c for ordered-set and similar aggregates. 2014-07-03 18:25:37 -04:00
funcapi.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
getaddrinfo.h Fix assorted issues in client host name lookup. 2014-04-02 17:11:24 -04:00
getopt_long.h Centralize getopt-related declarations in a new header file pg_getopt.h. 2014-02-15 14:31:30 -05:00
Makefile Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
miscadmin.h Perform an immediate shutdown if the postmaster.pid file is removed. 2015-10-06 17:15:27 -04:00
pg_config.h.in Cope if platform declares mbstowcs_l(), but not locale_t, in <xlocale.h>. 2016-03-15 13:19:58 -04:00
pg_config.h.win32 Stamp 9.4.8. 2016-05-09 16:52:03 -04:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Further reduce the number of semaphores used under --disable-spinlocks. 2016-04-18 13:33:07 -04:00
pg_getopt.h Fix comment. 2014-05-08 12:42:56 -04:00
pg_trace.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
pgstat.h Don't reset changes_since_analyze after a selective-columns ANALYZE. 2016-06-06 17:44:17 -04:00
pgtar.h Adopt the GNU convention for handling tar-archive members exceeding 8GB. 2015-11-21 20:22:39 -05:00
pgtime.h Support timezone abbreviations that sometimes change. 2014-10-16 15:22:13 -04:00
port.h Revert error-throwing wrappers for the printf family of functions. 2015-05-19 18:16:19 -04:00
postgres.h Adjust DatumGetBool macro, this time for sure. 2016-04-28 11:51:13 -04:00
postgres_ext.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postgres_fe.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
rusagestub.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
windowapi.h Update copyright for 2014 2014-01-07 16:05:30 -05:00