Ensure that database objects are created consistently.
authorPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 12 Sep 2017 06:47:19 +0000 (12:17 +0530)
committerPavan Deolasee <pavan.deolasee@gmail.com>
Tue, 12 Sep 2017 07:02:41 +0000 (12:32 +0530)
commitf7d1d581c950191a465b8483173f2ad69ae8fffe
tree763feec8821a8ea9610d7b6dda47983afdbaa576
parent2aea4fefba737f0fa70ab720e8ed17a2998ee6aa
Ensure that database objects are created consistently.

We now create views/materialised views on all nodes, unless they are temporary
objects in which case they are created only on the local coordinator and the
datanodes. Similarly, temporary sequences are created on the local coordinator
and the datanodes.

This solves many outstanding problems in the regression results where remote
nodes used to fail because of non-existent type for a view or similar such
issues. A few other test cases now started to work correctly and produce output
matching upstream PG. So the expected output for those test cases has been
appropriated fixed.

Couple of sequences in the rangefuncs test case have been converted into
permanent sequences because the subsequent SQL functions refer to them and
hence fail if they do not exist on the remote coordinators.

The problem with special RULE converting a regular table into a view goes away
with the fix since DROP VIEW commands are now propgataed to the datanodes too.
src/backend/tcop/utility.c
src/test/regress/expected/rowsecurity.out
src/test/regress/expected/rowtypes.out
src/test/regress/expected/subselect.out
src/test/regress/expected/updatable_views.out
src/test/regress/sql/rangefuncs.sql