[COMMITTERS] pgsql: Teach map_partition_varattnos to handle whole-row expressions.

2017-08-03 Thread Robert Haas
Teach map_partition_varattnos to handle whole-row expressions. Otherwise, partitioned tables with RETURNING expressions or subject to a WITH CHECK OPTION do not work properly. Amit Langote, reviewed by Amit Khandekar and Etsuro Fujita. A few comment changes by me. Discussion: http://postgr.es/

[COMMITTERS] pgsql: Improve ExecModifyTable comments.

2017-08-03 Thread Robert Haas
Improve ExecModifyTable comments. Some of these comments wrongly implied that only an AFTER ROW trigger will cause a 'wholerow' attribute to be present for a foreign table, but a BEFORE ROW trigger can have the same effect. Others implied that it would always be present for a foreign table, but t

[COMMITTERS] pgsql: Allow a foreign table CHECK constraint to be initially NOT VALID

2017-08-03 Thread Robert Haas
Allow a foreign table CHECK constraint to be initially NOT VALID. For a table, the constraint can be considered validated immediately, because the table must be empty. But for a foreign table this is not necessarily the case. Fixes a bug in commit f27a6b15e6566fba7748d0d9a3fc5bcfd52c4a1b. Amit

[COMMITTERS] pgsql: Allow a foreign table CHECK constraint to be initially NOT VALID

2017-08-03 Thread Robert Haas
Allow a foreign table CHECK constraint to be initially NOT VALID. For a table, the constraint can be considered validated immediately, because the table must be empty. But for a foreign table this is not necessarily the case. Fixes a bug in commit f27a6b15e6566fba7748d0d9a3fc5bcfd52c4a1b. Amit

[COMMITTERS] pgsql: Code beautification for ATExecAttachPartition.

2017-08-03 Thread Robert Haas
Code beautification for ATExecAttachPartition. Amit Langote Discussion: http://postgr.es/m/CAFjFpReT_kq_uwU_B8aWDxR7jNGE=P0iELycdq5oupi=xsq...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/583df3b5c56258df2a03e08e3ef00aabe0cf306d Modified Files -

[COMMITTERS] pgsql: Fix lock upgrade hazard in ATExecAttachPartition.

2017-08-03 Thread Robert Haas
Fix lock upgrade hazard in ATExecAttachPartition. Amit Langote Discussion: http://postgr.es/m/CAFjFpReT_kq_uwU_B8aWDxR7jNGE=P0iELycdq5oupi=xsq...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/972b6ec20bf090a18145624f8092d2cb1715ab83 Modified File

[COMMITTERS] pgsql: Fix build on zlib-less environments

2017-08-03 Thread Alvaro Herrera
Fix build on zlib-less environments Commit 4d57e8381677 added support for getting I/O errors out of zlib, but it introduced a portability problem for systems without zlib. Repair by wrapping the zlib call inside #ifdef and restore the original code in the other branch. This serves to illustrate t

[COMMITTERS] pgsql: Fix build on zlib-less environments

2017-08-03 Thread Alvaro Herrera
Fix build on zlib-less environments Commit 4d57e8381677 added support for getting I/O errors out of zlib, but it introduced a portability problem for systems without zlib. Repair by wrapping the zlib call inside #ifdef and restore the original code in the other branch. This serves to illustrate t

[COMMITTERS] pgsql: Fix build on zlib-less environments

2017-08-03 Thread Alvaro Herrera
Fix build on zlib-less environments Commit 4d57e8381677 added support for getting I/O errors out of zlib, but it introduced a portability problem for systems without zlib. Repair by wrapping the zlib call inside #ifdef and restore the original code in the other branch. This serves to illustrate t

[COMMITTERS] pgsql: Fix build on zlib-less environments

2017-08-03 Thread Alvaro Herrera
Fix build on zlib-less environments Commit 4d57e8381677 added support for getting I/O errors out of zlib, but it introduced a portability problem for systems without zlib. Repair by wrapping the zlib call inside #ifdef and restore the original code in the other branch. This serves to illustrate t

[COMMITTERS] pgsql: Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW command

2017-08-03 Thread Tom Lane
Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW commands last. Because we push all ACL (i.e. GRANT/REVOKE) restore steps to the end, materialized view refreshes were occurring while the permissions on referenced objects were still at defaults. This led to failures if, say, an MV owned by

[COMMITTERS] pgsql: Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW command

2017-08-03 Thread Tom Lane
Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW commands last. Because we push all ACL (i.e. GRANT/REVOKE) restore steps to the end, materialized view refreshes were occurring while the permissions on referenced objects were still at defaults. This led to failures if, say, an MV owned by

[COMMITTERS] pgsql: Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW command

2017-08-03 Thread Tom Lane
Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW commands last. Because we push all ACL (i.e. GRANT/REVOKE) restore steps to the end, materialized view refreshes were occurring while the permissions on referenced objects were still at defaults. This led to failures if, say, an MV owned by

[COMMITTERS] pgsql: Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW command

2017-08-03 Thread Tom Lane
Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW commands last. Because we push all ACL (i.e. GRANT/REVOKE) restore steps to the end, materialized view refreshes were occurring while the permissions on referenced objects were still at defaults. This led to failures if, say, an MV owned by

[COMMITTERS] pgsql: Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW command

2017-08-03 Thread Tom Lane
Fix pg_dump/pg_restore to emit REFRESH MATERIALIZED VIEW commands last. Because we push all ACL (i.e. GRANT/REVOKE) restore steps to the end, materialized view refreshes were occurring while the permissions on referenced objects were still at defaults. This led to failures if, say, an MV owned by

[COMMITTERS] pgsql: Add missing ALTER USER variants

2017-08-03 Thread Peter Eisentraut
Add missing ALTER USER variants ALTER USER ... SET did not support all the syntax variants of ALTER ROLE ... SET. Reported-by: Pavel Golub Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/df04db0413589491e5261d229c448e9faec1342e Modified Files

[COMMITTERS] pgsql: Add missing ALTER USER variants

2017-08-03 Thread Peter Eisentraut
Add missing ALTER USER variants ALTER USER ... SET did not support all the syntax variants of ALTER ROLE ... SET. Reported-by: Pavel Golub Branch -- REL9_2_STABLE Details --- https://git.postgresql.org/pg/commitdiff/22eb38caa11979e3d89030eb30c9897bbb9e05ef Modified Files

[COMMITTERS] pgsql: Further unify ROLE and USER command grammar rules

2017-08-03 Thread Peter Eisentraut
Further unify ROLE and USER command grammar rules ALTER USER ... SET did not support all the syntax variants of ALTER ROLE ... SET. Fix that, and to avoid further deviations of this kind, unify many the grammar rules for ROLE/USER/GROUP commands. Reported-by: Pavel Golub Branch -- master

[COMMITTERS] pgsql: Add missing ALTER USER variants

2017-08-03 Thread Peter Eisentraut
Add missing ALTER USER variants ALTER USER ... SET did not support all the syntax variants of ALTER ROLE ... SET. Reported-by: Pavel Golub Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f2878a608933441fec185f944aeb44e35c6018f1 Modified Files

[COMMITTERS] pgsql: Add missing ALTER USER variants

2017-08-03 Thread Peter Eisentraut
Add missing ALTER USER variants ALTER USER ... SET did not support all the syntax variants of ALTER ROLE ... SET. Reported-by: Pavel Golub Branch -- REL9_3_STABLE Details --- https://git.postgresql.org/pg/commitdiff/b7d1bc820e191d8b56a35c8a8af409062c3a71be Modified Files

[COMMITTERS] pgsql: Add missing ALTER USER variants

2017-08-03 Thread Peter Eisentraut
Add missing ALTER USER variants ALTER USER ... SET did not support all the syntax variants of ALTER ROLE ... SET. Reported-by: Pavel Golub Branch -- REL9_4_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e0446d06e9993c4fc18261c1bb240f3976e951bc Modified Files