pgsql: Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER

2018-08-17 Thread Tom Lane
Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER commands. Previously, this code blindly followed the common coding pattern of passing PQserverVersion(AH->connection) as the server-version parameter of fmtQualifiedId. That works as long as we have a connection; but in pg_restore w

pgsql: Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER

2018-08-17 Thread Tom Lane
Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER commands. Previously, this code blindly followed the common coding pattern of passing PQserverVersion(AH->connection) as the server-version parameter of fmtQualifiedId. That works as long as we have a connection; but in pg_restore w

pgsql: Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER

2018-08-17 Thread Tom Lane
Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER commands. Previously, this code blindly followed the common coding pattern of passing PQserverVersion(AH->connection) as the server-version parameter of fmtQualifiedId. That works as long as we have a connection; but in pg_restore w

pgsql: Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER

2018-08-17 Thread Tom Lane
Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER commands. Previously, this code blindly followed the common coding pattern of passing PQserverVersion(AH->connection) as the server-version parameter of fmtQualifiedId. That works as long as we have a connection; but in pg_restore w

pgsql: Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER

2018-08-17 Thread Tom Lane
Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER commands. Previously, this code blindly followed the common coding pattern of passing PQserverVersion(AH->connection) as the server-version parameter of fmtQualifiedId. That works as long as we have a connection; but in pg_restore w

pgsql: Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER

2018-08-17 Thread Tom Lane
Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER commands. Previously, this code blindly followed the common coding pattern of passing PQserverVersion(AH->connection) as the server-version parameter of fmtQualifiedId. That works as long as we have a connection; but in pg_restore w

pgsql: Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER

2018-08-17 Thread Tom Lane
Ensure schema qualification in pg_restore DISABLE/ENABLE TRIGGER commands. Previously, this code blindly followed the common coding pattern of passing PQserverVersion(AH->connection) as the server-version parameter of fmtQualifiedId. That works as long as we have a connection; but in pg_restore w

pgsql: InsertPgAttributeTuple() to set attcacheoff

2018-08-17 Thread Peter Eisentraut
InsertPgAttributeTuple() to set attcacheoff InsertPgAttributeTuple() is the interface between in-memory tuple descriptors and on-disk pg_attribute, so it makes sense to give it the job of resetting attcacheoff. This avoids having all the callers having to do so. Reviewed-by: Tom Lane Branch --

pgsql: Set scan direction appropriately for SubPlans (bug #15336)

2018-08-17 Thread Andrew Gierth
Set scan direction appropriately for SubPlans (bug #15336) When executing a SubPlan in an expression, the EState's direction field was left alone, resulting in an attempt to execute the subplan backwards if it was encountered during a backwards scan of a cursor. Also, though much less likely, it w

pgsql: Set scan direction appropriately for SubPlans (bug #15336)

2018-08-17 Thread Andrew Gierth
Set scan direction appropriately for SubPlans (bug #15336) When executing a SubPlan in an expression, the EState's direction field was left alone, resulting in an attempt to execute the subplan backwards if it was encountered during a backwards scan of a cursor. Also, though much less likely, it w

pgsql: Set scan direction appropriately for SubPlans (bug #15336)

2018-08-17 Thread Andrew Gierth
Set scan direction appropriately for SubPlans (bug #15336) When executing a SubPlan in an expression, the EState's direction field was left alone, resulting in an attempt to execute the subplan backwards if it was encountered during a backwards scan of a cursor. Also, though much less likely, it w

pgsql: Set scan direction appropriately for SubPlans (bug #15336)

2018-08-17 Thread Andrew Gierth
Set scan direction appropriately for SubPlans (bug #15336) When executing a SubPlan in an expression, the EState's direction field was left alone, resulting in an attempt to execute the subplan backwards if it was encountered during a backwards scan of a cursor. Also, though much less likely, it w

pgsql: Set scan direction appropriately for SubPlans (bug #15336)

2018-08-17 Thread Andrew Gierth
Set scan direction appropriately for SubPlans (bug #15336) When executing a SubPlan in an expression, the EState's direction field was left alone, resulting in an attempt to execute the subplan backwards if it was encountered during a backwards scan of a cursor. Also, though much less likely, it w

pgsql: Set scan direction appropriately for SubPlans (bug #15336)

2018-08-17 Thread Andrew Gierth
Set scan direction appropriately for SubPlans (bug #15336) When executing a SubPlan in an expression, the EState's direction field was left alone, resulting in an attempt to execute the subplan backwards if it was encountered during a backwards scan of a cursor. Also, though much less likely, it w

pgsql: Set scan direction appropriately for SubPlans (bug #15336)

2018-08-17 Thread Andrew Gierth
Set scan direction appropriately for SubPlans (bug #15336) When executing a SubPlan in an expression, the EState's direction field was left alone, resulting in an attempt to execute the subplan backwards if it was encountered during a backwards scan of a cursor. Also, though much less likely, it w

pgsql: Fix configure's snprintf test so it exposes HP-UX bug.

2018-08-17 Thread Tom Lane
Fix configure's snprintf test so it exposes HP-UX bug. Since commit e1d19c902, buildfarm member gharial has been failing with symptoms indicating that snprintf sometimes returns -1 for buffer overrun, even though it passes the added configure check. Some google research suggests that this happens

pgsql: pg_upgrade: issue helpful error message for use on standbys

2018-08-17 Thread Bruce Momjian
pg_upgrade: issue helpful error message for use on standbys Commit 777e6ddf1723306bd2bf8fe6f804863f459b0323 checked for a shut down message from a standby and allowed it to continue. This patch reports a helpful error message in these cases, suggesting to use rsync as documented. Diagnosed-by:

pgsql: pg_upgrade: issue helpful error message for use on standbys

2018-08-17 Thread Bruce Momjian
pg_upgrade: issue helpful error message for use on standbys Commit 777e6ddf1723306bd2bf8fe6f804863f459b0323 checked for a shut down message from a standby and allowed it to continue. This patch reports a helpful error message in these cases, suggesting to use rsync as documented. Diagnosed-by:

pgsql: pg_upgrade: issue helpful error message for use on standbys

2018-08-17 Thread Bruce Momjian
pg_upgrade: issue helpful error message for use on standbys Commit 777e6ddf1723306bd2bf8fe6f804863f459b0323 checked for a shut down message from a standby and allowed it to continue. This patch reports a helpful error message in these cases, suggesting to use rsync as documented. Diagnosed-by:

pgsql: pg_upgrade: issue helpful error message for use on standbys

2018-08-17 Thread Bruce Momjian
pg_upgrade: issue helpful error message for use on standbys Commit 777e6ddf1723306bd2bf8fe6f804863f459b0323 checked for a shut down message from a standby and allowed it to continue. This patch reports a helpful error message in these cases, suggesting to use rsync as documented. Diagnosed-by:

pgsql: pg_upgrade: issue helpful error message for use on standbys

2018-08-17 Thread Bruce Momjian
pg_upgrade: issue helpful error message for use on standbys Commit 777e6ddf1723306bd2bf8fe6f804863f459b0323 checked for a shut down message from a standby and allowed it to continue. This patch reports a helpful error message in these cases, suggesting to use rsync as documented. Diagnosed-by:

pgsql: pg_upgrade: issue helpful error message for use on standbys

2018-08-17 Thread Bruce Momjian
pg_upgrade: issue helpful error message for use on standbys Commit 777e6ddf1723306bd2bf8fe6f804863f459b0323 checked for a shut down message from a standby and allowed it to continue. This patch reports a helpful error message in these cases, suggesting to use rsync as documented. Diagnosed-by:

pgsql: pg_upgrade: issue helpful error message for use on standbys

2018-08-17 Thread Bruce Momjian
pg_upgrade: issue helpful error message for use on standbys Commit 777e6ddf1723306bd2bf8fe6f804863f459b0323 checked for a shut down message from a standby and allowed it to continue. This patch reports a helpful error message in these cases, suggesting to use rsync as documented. Diagnosed-by: