[COMMITTERS] pgsql: Reformat psql's --help=variables output.

2017-09-05 Thread Tom Lane
Reformat psql's --help=variables output. The previous format with variable names and descriptions in separate columns was extremely constraining about the length of the descriptions. We'd dealt with that in several inconsistent ways over the years, including letting the lines run over 80 character

[COMMITTERS] pgsql: Add psql variables showing server version and psql version.

2017-09-05 Thread Tom Lane
Add psql variables showing server version and psql version. We already had a psql variable VERSION that shows the verbose form of psql's own version. Add VERSION_NAME to show the short form (e.g., "11devel") and VERSION_NUM to show the numeric form (e.g., 11). Also add SERVER_VERSION_NAME and

Re: [COMMITTERS] pgsql: Add psql variables showing server version and psql version.

2017-09-05 Thread Simon Riggs
On 5 September 2017 at 07:51, Tom Lane wrote: > Add psql variables showing server version and psql version. > > We already had a psql variable VERSION that shows the verbose form of > psql's own version. Add VERSION_NAME to show the short form (e.g., > "11devel") and VERSION_NUM to show the numer

[COMMITTERS] pgsql: Correct base backup throttling

2017-09-05 Thread Alvaro Herrera
Correct base backup throttling Throttling for sending a base backup in walsender is broken for the case where there is a lot of WAL traffic, because the latch used to put the walsender to sleep is also signalled by regular WAL traffic (and each signal causes an additional batch of data to be sent)

[COMMITTERS] pgsql: Correct base backup throttling

2017-09-05 Thread Alvaro Herrera
Correct base backup throttling Throttling for sending a base backup in walsender is broken for the case where there is a lot of WAL traffic, because the latch used to put the walsender to sleep is also signalled by regular WAL traffic (and each signal causes an additional batch of data to be sent)

[COMMITTERS] pgsql: In psql, use PSQL_PAGER in preference to PAGER, if it's set.

2017-09-05 Thread Tom Lane
In psql, use PSQL_PAGER in preference to PAGER, if it's set. This allows the user's environment to set up a psql-specific choice of pager, in much the same way that we provide PSQL_EDITOR to allow a psql-specific override of the more widely known EDITOR variable. Pavel Stehule, reviewed by Thomas

[COMMITTERS] pgsql: Support retaining data dirs on successful TAP tests

2017-09-05 Thread Peter Eisentraut
Support retaining data dirs on successful TAP tests This moves the data directories from using temporary directories with randomness in the directory name to a static name, to make it easier to debug. The data directory will be retained if tests fail or the test code dies/exits with failure, and

[COMMITTERS] pgsql: fuzzystrmatch: Remove dead code

2017-09-05 Thread Peter Eisentraut
fuzzystrmatch: Remove dead code Remnants left behind by a323ede2802956f115d71599514fbc01f2575dee Reviewed-by: Michael Paquier Reviewed-by: Ryan Murphy Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5a739e7b2c26aa95ee2871071c87fa248df1776b Modified Files ---

[COMMITTERS] pgsql: Remove endof macro

2017-09-05 Thread Peter Eisentraut
Remove endof macro It has not been used in a long time, and it doesn't seem safe anyway, so drop it. Reviewed-by: Michael Paquier Reviewed-by: Ryan Murphy Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/153a49bb331005bf70b1e76e69fe28f1c417cc91 Modified Files ---

[COMMITTERS] pgsql: Remove our own definition of NULL

2017-09-05 Thread Peter Eisentraut
Remove our own definition of NULL Surely everyone has that by now. Reviewed-by: Michael Paquier Reviewed-by: Ryan Murphy Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ba26f5cf768a31e0cbdf5eb8675ee187ad35fd0b Modified Files -- src/include/c.h | 12 +

[COMMITTERS] pgsql: Remove unnecessary parentheses in return statements

2017-09-05 Thread Peter Eisentraut
Remove unnecessary parentheses in return statements The parenthesized style has only been used in a few modules. Change that to use the style that is predominant across the whole tree. Reviewed-by: Michael Paquier Reviewed-by: Ryan Murphy Branch -- master Details --- https://git.post

[COMMITTERS] pgsql: Remove unnecessary casts

2017-09-05 Thread Peter Eisentraut
Remove unnecessary casts Reviewed-by: Michael Paquier Reviewed-by: Ryan Murphy Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ec3a4375961abaa209116162966bc7af2d51148a Modified Files -- contrib/cube/cube.c | 8 1 file changed, 4 insertions(+),

Re: [COMMITTERS] pgsql: Remove endof macro

2017-09-05 Thread Andres Freund
Hi, On 2017-09-05 19:08:06 +, Peter Eisentraut wrote: > Remove endof macro > > It has not been used in a long time, and it doesn't seem safe anyway, so > drop it. I've no problem removing this, but why isn't it safe? It's explicitly allowed to compute (not dereference) the address of end-of-

[COMMITTERS] pgsql: Use lfirst_node() and linitial_node() where appropriate in plann

2017-09-05 Thread Tom Lane
Use lfirst_node() and linitial_node() where appropriate in planner.c. There's no particular reason to target this module for the first wholesale application of these macros; but we gotta start somewhere. Ashutosh Bapat and Jeevan Chalke Discussion: https://postgr.es/m/CAFjFpRcNr3r=u0ni=7A4GD9Nn

[COMMITTERS] pgsql: Fix psql's --help=commands output line count.

2017-09-05 Thread Tom Lane
Fix psql's --help=commands output line count. Evidently somebody neglected to update this sometime in the v10 cycle. Patching REL_10_STABLE only; this value is about to be obsolete in HEAD anyway. Noted while examining \gdesc patch. Branch -- REL_10_STABLE Details --- https://git.postg

[COMMITTERS] pgsql: Add \gdesc psql command.

2017-09-05 Thread Tom Lane
Add \gdesc psql command. This command acts somewhat like \g, but instead of executing the query buffer, it merely prints a description of the columns that the query result would have. (Of course, this still requires parsing the query; if parse analysis fails, you get an error anyway.) We accompl

[COMMITTERS] pgsql: doc: Clarify pg_inherits description

2017-09-05 Thread Peter Eisentraut
doc: Clarify pg_inherits description Reported-by: [email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0b554e4e63a4ba4852c01951311713e23acdae02 Modified Files -- doc/src/sgml/catalogs.sgml | 2 +- 1 file changed, 1 insertion(+), 1 dele