postgresql/src/include
Tom Lane 9492cf86e4 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 Clear all-frozen visibilitymap status when locking tuples. 2016-07-18 02:01:13 -07:00
bootstrap Update copyright for 2016 2016-01-02 13:33:40 -05:00
catalog Advance PG_CONTROL_VERSION. 2016-07-16 12:49:14 -04:00
commands Print a given subplan only once in EXPLAIN. 2016-07-11 18:14:29 -04:00
common pgindent run for 9.6 2016-06-09 18:02:36 -04:00
datatype Be more careful about out-of-range dates and timestamps. 2016-03-16 19:09:28 -04:00
executor pgindent run for 9.6 2016-06-09 18:02:36 -04:00
fe_utils Move and rename fmtReloptionsArray(). 2016-05-06 12:45:36 +01:00
foreign Remove GetUserMappingId() and GetUserMappingById(). 2016-07-22 11:32:23 -04:00
lib Remove mergeHyperLogLog. 2016-04-27 10:55:32 -04:00
libpq Fix several mistakes around parallel workers and client_encoding. 2016-06-30 18:35:32 -04:00
mb Update copyright for 2016 2016-01-02 13:33:40 -05:00
nodes Fix assorted fallout from IS [NOT] NULL patch. 2016-07-28 16:09:15 -04:00
optimizer Avoid making a separate pass over the query to check for partializability. 2016-06-26 15:55:01 -04:00
parser Fix type-safety problem with parallel aggregate serial/deserialization. 2016-06-22 16:52:41 -04:00
port Fix various common mispellings. 2016-06-03 16:08:45 +01:00
portability Update copyright for 2016 2016-01-02 13:33:40 -05:00
postmaster Allow Pin/UnpinBuffer to operate in a lockfree manner. 2016-04-10 20:12:32 -07:00
regex Suppress compiler warnings about useless comparison of unsigned to zero. 2016-02-15 17:12:16 -05:00
replication Add conninfo to pg_stat_wal_receiver 2016-06-29 16:57:17 -04:00
rewrite Update copyright for 2016 2016-01-02 13:33:40 -05:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Improve WritebackContextInit() comment and prototype argument names. 2016-07-01 14:29:03 -07:00
tcop Stop the executor if no more tuples can be sent from worker to leader. 2016-06-06 14:52:58 -04:00
tsearch Change predecence of phrase operator. 2016-06-27 20:55:24 +03:00
utils Avoid invalidating all foreign-join cached plans when user mappings change. 2016-07-15 17:23:02 -04:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
Makefile Create src/fe_utils/, and move stuff into there from pg_dump's dumputils. 2016-03-24 15:55:57 -04:00
c.h Make init_spin_delay() C89 compliant and change stuck spinlock reporting. 2016-04-13 17:00:53 -07:00
fmgr.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
funcapi.h Widen query numbers-of-tuples-processed counters to uint64. 2016-03-12 16:05:29 -05:00
getaddrinfo.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
getopt_long.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
miscadmin.h Mark PostmasterPid as PGDLLIMPORT. 2016-06-03 14:06:35 -04:00
pg_config.h.in Add BSD authentication method. 2016-04-08 13:52:06 -04:00
pg_config.h.win32 Stamp 9.6beta3. 2016-07-18 16:54:26 -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 Add support for more extensive testing of raw_expression_tree_walker(). 2016-05-23 19:08:26 -04:00
pg_getopt.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pg_trace.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pgstat.h pgindent run for 9.6 2016-06-09 18:02:36 -04:00
pgtar.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
pgtime.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
port.h On all Windows platforms, not just Cygwin, use _timezone and _tzname. 2016-03-28 20:59:25 -04:00
postgres.h Adjust DatumGetBool macro, this time for sure. 2016-04-28 11:50:58 -04:00
postgres_ext.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postgres_fe.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
rusagestub.h Update copyright for 2016 2016-01-02 13:33:40 -05:00
windowapi.h Update copyright for 2016 2016-01-02 13:33:40 -05:00