Re: [COMMITTERS] pgsql: pgbench: Allow changing weights for scripts

2016-03-19 Thread Fabien COELHO
ISTM that in stack variables are initialized to zero automatically, so although it is not explicitely initialized, it is not uninitialized... Uh? They're not. Indeed, I mixed up with "static", shame on me! -- Fabien. -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.o

Re: [COMMITTERS] pgsql: pgbench: Allow changing weights for scripts

2016-03-19 Thread Andres Freund
On 2016-03-19 20:23:03 +0100, Fabien COELHO wrote: > > >pgbench.c:2765: warning: 'ps.stats.lag.sum2' is used uninitialized in this > >function > > Sorry for the noise. > > Strangely, I did not get that warning with gcc 4.8.4. > > ISTM that in stack variables are initialized to zero automatical

Re: [COMMITTERS] pgsql: pgbench: Allow changing weights for scripts

2016-03-19 Thread Fabien COELHO
pgbench.c:2765: warning: 'ps.stats.lag.sum2' is used uninitialized in this function Sorry for the noise. Strangely, I did not get that warning with gcc 4.8.4. ISTM that in stack variables are initialized to zero automatically, so although it is not explicitely initialized, it is not uninit

[COMMITTERS] pgsql: pgbench: Allow changing weights for scripts

2016-03-19 Thread Alvaro Herrera
pgbench: Allow changing weights for scripts Previously, all scripts had the same probability of being chosen when multiple of them were specified via -b, -f, -N, -S. With this commit, -b and -f now search for an "@" in the script name and use the integer found after it as the drawing probability