Re: pgsql: Fix declaration after statement

2019-04-10 Thread Thomas Munro
On Thu, Apr 11, 2019 at 5:05 PM Tom Lane wrote: > Alvaro Herrera writes: > > (My compiler does not complain about it, even though > > -Wdeclaration-after-statement is specified. Weird.) > > longfin's compiler doesn't either (clang-1001.0.46.3). > What are you using? Maybe we should be filing bu

Re: pgsql: Fix memory leak in pgbench

2019-04-10 Thread Masahiko Sawada
On Thu, Apr 11, 2019 at 12:58 PM Alvaro Herrera wrote: > > On 2019-Apr-10, Masahiko Sawada wrote: > > > This change leads a compiler warning on my machine: > > > > pgbench.c: In function ‘readCommandResponse’: > > pgbench.c:2730: warning: ISO C90 forbids mixed declarations and code > > > I think w

Re: pgsql: Fix memory leak in pgbench

2019-04-10 Thread Masahiko Sawada
On Thu, Apr 11, 2019 at 1:54 PM Tom Lane wrote: > > Thomas Munro writes: > > . o O ( Is it time to run with -Werror on some BF animals yet? ) > > I've got -Werror turned on on longfin; I'm surprised that it's not > whining about this. Perhaps -Wdeclaration-after-statement doesn't > really do any

Re: pgsql: Fix declaration after statement

2019-04-10 Thread Tom Lane
Alvaro Herrera writes: > (My compiler does not complain about it, even though > -Wdeclaration-after-statement is specified. Weird.) longfin's compiler doesn't either (clang-1001.0.46.3). What are you using? Maybe we should be filing bug reports? regards, tom lane

Re: pgsql: Fix memory leak in pgbench

2019-04-10 Thread Tom Lane
Thomas Munro writes: > . o O ( Is it time to run with -Werror on some BF animals yet? ) I've got -Werror turned on on longfin; I'm surprised that it's not whining about this. Perhaps -Wdeclaration-after-statement doesn't really do anything on clang? Anyway, I'd be in favor of having at least on

Re: pgsql: Fix memory leak in pgbench

2019-04-10 Thread Alvaro Herrera
On 2019-Apr-10, Masahiko Sawada wrote: > This change leads a compiler warning on my machine: > > pgbench.c: In function ‘readCommandResponse’: > pgbench.c:2730: warning: ISO C90 forbids mixed declarations and code > I think we should declare is_last before doing next_res = > PQgetResult(st->con

pgsql: Fix declaration after statement

2019-04-10 Thread Alvaro Herrera
Fix declaration after statement This style is frowned upon. I inadvertently introduced one in commit fe0e0b4fc7f0. (My compiler does not complain about it, even though -Wdeclaration-after-statement is specified. Weird.) Author: Masahiko Sawada Branch -- master Details --- https://git

Re: pgsql: Fix memory leak in pgbench

2019-04-10 Thread Thomas Munro
On Wed, Apr 10, 2019 at 11:12 PM Michael Paquier wrote: > On Wed, Apr 10, 2019 at 04:05:34PM +0900, Masahiko Sawada wrote: > > Thank you! I didn't know the detail of that PostgreSQL supports C99 > > standard but I hope the warning will be fixed and coming patches will > > still obey that rule. > >

pgsql: Fix backwards test in operator_precedence_warning logic.

2019-04-10 Thread Tom Lane
Fix backwards test in operator_precedence_warning logic. Warnings about unary minus might have been wrong. It's a bit surprising that nobody noticed yet ... probably the precedence-warning feature hasn't really been used much in the field. Rikard Falkeborn Discussion: https://postgr.es/m/CADRD

pgsql: Fix backwards test in operator_precedence_warning logic.

2019-04-10 Thread Tom Lane
Fix backwards test in operator_precedence_warning logic. Warnings about unary minus might have been wrong. It's a bit surprising that nobody noticed yet ... probably the precedence-warning feature hasn't really been used much in the field. Rikard Falkeborn Discussion: https://postgr.es/m/CADRD

pgsql: Fix backwards test in operator_precedence_warning logic.

2019-04-10 Thread Tom Lane
Fix backwards test in operator_precedence_warning logic. Warnings about unary minus might have been wrong. It's a bit surprising that nobody noticed yet ... probably the precedence-warning feature hasn't really been used much in the field. Rikard Falkeborn Discussion: https://postgr.es/m/CADRD

pgsql: Fix backwards test in operator_precedence_warning logic.

2019-04-10 Thread Tom Lane
Fix backwards test in operator_precedence_warning logic. Warnings about unary minus might have been wrong. It's a bit surprising that nobody noticed yet ... probably the precedence-warning feature hasn't really been used much in the field. Rikard Falkeborn Discussion: https://postgr.es/m/CADRD

pgsql: Fix backwards test in operator_precedence_warning logic.

2019-04-10 Thread Tom Lane
Fix backwards test in operator_precedence_warning logic. Warnings about unary minus might have been wrong. It's a bit surprising that nobody noticed yet ... probably the precedence-warning feature hasn't really been used much in the field. Rikard Falkeborn Discussion: https://postgr.es/m/CADRD

Re: pgsql: Fix memory leak in pgbench

2019-04-10 Thread Michael Paquier
On Wed, Apr 10, 2019 at 04:05:34PM +0900, Masahiko Sawada wrote: > Thank you! I didn't know the detail of that PostgreSQL supports C99 > standard but I hope the warning will be fixed and coming patches will > still obey that rule. Ah, thanks I missed that bit from the docs. I should have paid mor

pgsql: pg_restore: Make not verbose by default

2019-04-10 Thread Peter Eisentraut
pg_restore: Make not verbose by default This was accidentally changed in cc8d41511721d25d557fc02a46c053c0a602fed0. Reported-by: Christoph Berg Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/765525c8c2c6e55abe8c0cd43bf5c728926d76d4 Modified Files -- s

Re: pgsql: Fix memory leak in pgbench

2019-04-10 Thread Masahiko Sawada
On Wed, Apr 10, 2019 at 3:10 PM Fabien COELHO wrote: > > > Hello Masahiko-san, > > > This change leads a compiler warning on my machine: > > > > pgbench.c: In function ‘readCommandResponse’: > > pgbench.c:2730: warning: ISO C90 forbids mixed declarations and code > >

Re: pgsql: Avoid "could not reattach" by providing space for concurrent all

2019-04-10 Thread Noah Misch
On Tue, Apr 09, 2019 at 10:22:55AM -0400, Andrew Dunstan wrote: > On Tue, Apr 9, 2019 at 12:44 AM Noah Misch wrote: > > > > Avoid "could not reattach" by providing space for concurrent allocation. > > > > This has broken builds on frogmouth, and I'm betting any mingw animal. Fixed in ba3fb5d.