postgresql/src/include
Tom Lane dc9e03bf47 Fix CREATE MATVIEW/CREATE TABLE AS ... WITH NO DATA to not plan the query.
Previously, these commands always planned the given query and went through
executor startup before deciding not to actually run the query if WITH NO
DATA is specified.  This behavior is problematic for pg_dump because it
may cause errors to be raised that we would rather not see before a
REFRESH MATERIALIZED VIEW command is issued.  See for example bug #13907
from Marian Krucina.  This change is not sufficient to fix that particular
bug, because we also need to tweak pg_dump to issue the REFRESH later,
but it's a necessary step on the way.

A user-visible side effect of doing things this way is that the returned
command tag for WITH NO DATA cases will now be "CREATE MATERIALIZED VIEW"
or "CREATE TABLE AS", not "SELECT 0".  We could preserve the old behavior
but it would take more code, and arguably that was just an implementation
artifact not intended behavior anyhow.

In 9.5 and HEAD, also get rid of the static variable CreateAsReladdr, which
was trouble waiting to happen; there is not any prohibition on nested
CREATE commands.

Back-patch to 9.3 where CREATE MATERIALIZED VIEW was introduced.

Michael Paquier and Tom Lane

Report: <20160202161407.2778.24659@wrigleys.postgresql.org>
2016-06-27 15:57:21 -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 CREATE MATVIEW/CREATE TABLE AS ... WITH NO DATA to not plan the query. 2016-06-27 15:57:21 -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 Be more predictable about reporting "lock timeout" vs "statement timeout". 2016-05-27 10:40:20 -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