[COMMITTERS] pgsql: Re-allow SRFs and window functions within sub-selects within agg

2017-06-28 Thread Tom Lane
Re-allow SRFs and window functions within sub-selects within aggregates. check_agg_arguments_walker threw an error upon seeing a SRF or window function, but that is too aggressive: if the function is within a sub-select then it's perfectly fine. I broke the SRF case in commit 0436f6bde by copying

[COMMITTERS] pgsql: Re-allow SRFs and window functions within sub-selects within agg

2017-06-28 Thread Tom Lane
Re-allow SRFs and window functions within sub-selects within aggregates. check_agg_arguments_walker threw an error upon seeing a SRF or window function, but that is too aggressive: if the function is within a sub-select then it's perfectly fine. I broke the SRF case in commit 0436f6bde by copying

[COMMITTERS] pgsql: Re-allow SRFs and window functions within sub-selects within agg

2017-06-28 Thread Tom Lane
Re-allow SRFs and window functions within sub-selects within aggregates. check_agg_arguments_walker threw an error upon seeing a SRF or window function, but that is too aggressive: if the function is within a sub-select then it's perfectly fine. I broke the SRF case in commit 0436f6bde by copying

[COMMITTERS] pgsql: Re-allow SRFs and window functions within sub-selects within agg

2017-06-28 Thread Tom Lane
Re-allow SRFs and window functions within sub-selects within aggregates. check_agg_arguments_walker threw an error upon seeing a SRF or window function, but that is too aggressive: if the function is within a sub-select then it's perfectly fine. I broke the SRF case in commit 0436f6bde by copying

[COMMITTERS] pgsql: Re-allow SRFs and window functions within sub-selects within agg

2017-06-28 Thread Tom Lane
Re-allow SRFs and window functions within sub-selects within aggregates. check_agg_arguments_walker threw an error upon seeing a SRF or window function, but that is too aggressive: if the function is within a sub-select then it's perfectly fine. I broke the SRF case in commit 0436f6bde by copying

[COMMITTERS] pgsql: Do not require 'public' to exist for pg_dump -c

2017-06-28 Thread Stephen Frost
Do not require 'public' to exist for pg_dump -c Commit 330b84d8c4 didn't contemplate the case where the public schema has been dropped and introduced a query which fails when there is no public schema into pg_dump (when used with -c). Adjust the query used by pg_dump to handle the case where the

[COMMITTERS] pgsql: Do not require 'public' to exist for pg_dump -c

2017-06-28 Thread Stephen Frost
Do not require 'public' to exist for pg_dump -c Commit 330b84d8c4 didn't contemplate the case where the public schema has been dropped and introduced a query which fails when there is no public schema into pg_dump (when used with -c). Adjust the query used by pg_dump to handle the case where the

[COMMITTERS] pgsql: Second try at fixing tcp_keepalives_idle option on Solaris.

2017-06-28 Thread Tom Lane
Second try at fixing tcp_keepalives_idle option on Solaris. Buildfarm evidence shows that TCP_KEEPALIVE_THRESHOLD doesn't exist after all on Solaris < 11. This means we need to take positive action to prevent the TCP_KEEPALIVE code path from being taken on that platform. I've chosen to limit it w

[COMMITTERS] pgsql: Second try at fixing tcp_keepalives_idle option on Solaris.

2017-06-28 Thread Tom Lane
Second try at fixing tcp_keepalives_idle option on Solaris. Buildfarm evidence shows that TCP_KEEPALIVE_THRESHOLD doesn't exist after all on Solaris < 11. This means we need to take positive action to prevent the TCP_KEEPALIVE code path from being taken on that platform. I've chosen to limit it w

[COMMITTERS] pgsql: Second try at fixing tcp_keepalives_idle option on Solaris.

2017-06-28 Thread Tom Lane
Second try at fixing tcp_keepalives_idle option on Solaris. Buildfarm evidence shows that TCP_KEEPALIVE_THRESHOLD doesn't exist after all on Solaris < 11. This means we need to take positive action to prevent the TCP_KEEPALIVE code path from being taken on that platform. I've chosen to limit it w

[COMMITTERS] pgsql: Second try at fixing tcp_keepalives_idle option on Solaris.

2017-06-28 Thread Tom Lane
Second try at fixing tcp_keepalives_idle option on Solaris. Buildfarm evidence shows that TCP_KEEPALIVE_THRESHOLD doesn't exist after all on Solaris < 11. This means we need to take positive action to prevent the TCP_KEEPALIVE code path from being taken on that platform. I've chosen to limit it w

[COMMITTERS] pgsql: Second try at fixing tcp_keepalives_idle option on Solaris.

2017-06-28 Thread Tom Lane
Second try at fixing tcp_keepalives_idle option on Solaris. Buildfarm evidence shows that TCP_KEEPALIVE_THRESHOLD doesn't exist after all on Solaris < 11. This means we need to take positive action to prevent the TCP_KEEPALIVE code path from being taken on that platform. I've chosen to limit it w

[COMMITTERS] pgsql: Second try at fixing tcp_keepalives_idle option on Solaris.

2017-06-28 Thread Tom Lane
Second try at fixing tcp_keepalives_idle option on Solaris. Buildfarm evidence shows that TCP_KEEPALIVE_THRESHOLD doesn't exist after all on Solaris < 11. This means we need to take positive action to prevent the TCP_KEEPALIVE code path from being taken on that platform. I've chosen to limit it w

[COMMITTERS] pgsql: Fix transition tables for ON CONFLICT.

2017-06-28 Thread Andrew Gierth
Fix transition tables for ON CONFLICT. We now disallow having triggers with both transition tables and ON INSERT OR UPDATE (which was a PG extension to the spec anyway), because in this case it's not at all clear how the transition tables should work for an INSERT ... ON CONFLICT query. Separate

[COMMITTERS] pgsql: Fix transition tables for wCTEs.

2017-06-28 Thread Andrew Gierth
Fix transition tables for wCTEs. The original coding didn't handle this case properly; each separate DML substatement needs its own set of transitions. Patch by Thomas Munro Discussion: https://postgr.es/m/CAL9smLCDQ%3D2o024rBgtD4WihzX8B3C6u_oSQ2K3%2BR5grJrV0bg%40mail.gmail.com Branch -- m

[COMMITTERS] pgsql: Fix transition tables for partition/inheritance.

2017-06-28 Thread Andrew Gierth
Fix transition tables for partition/inheritance. We disallow row-level triggers with transition tables on child tables. Transition tables for triggers on the parent table contain only those columns present in the parent. (We can't mix tuple formats in a single transition table.) Patch by Thomas

[COMMITTERS] pgsql: Change pg_ctl to detect server-ready by watching status in postm

2017-06-28 Thread Tom Lane
Change pg_ctl to detect server-ready by watching status in postmaster.pid. Traditionally, "pg_ctl start -w" has waited for the server to become ready to accept connections by attempting a connection once per second. That has the major problem that connection issues (for instance, a kernel packet f

[COMMITTERS] pgsql: Ooops, WIN32 code in pg_ctl.c still needs PQExpBuffer.

2017-06-28 Thread Tom Lane
Ooops, WIN32 code in pg_ctl.c still needs PQExpBuffer. Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1ae8536545b7ea486dbe15247e6dd817ee211297 Modified Files -- src/bin/pg_ctl/pg_ctl.c | 4 src/tools/msvc/Mkvcbuild.pm | 2 +- 2 fi

[COMMITTERS] pgsql: Eat XIDs more efficiently in recovery TAP test.

2017-06-28 Thread Tom Lane
Eat XIDs more efficiently in recovery TAP test. The point of this loop is to insert 1000 rows into the test table and consume 1000 XIDs. I can't see any good reason why it's useful to launch 1000 psqls and 1000 backend processes to accomplish that. Pushing the looping into a plpgsql DO block shav