Re: pgbench - allow to store select results into variables
Rafia Sabih <rafia.sabih@enterprisedb.com>
From: Rafia Sabih <rafia.sabih@enterprisedb.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Paquier <michael.paquier@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>,
Robert Haas <robertmhaas@gmail.com>, Pavel Stehule <pavel.stehule@gmail.com>, PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-03-15T05:53:18Z
Lists: pgsql-hackers
On Tue, Jan 31, 2017 at 11:54 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote: > > Bonjour Michaël, > > Attached are the patch, a test script for the feature, and various test >>> scripts to trigger error cases. >>> >> >> I have moved this patch to next CF >> > > Ok. > > as the last status is a new patch set with no further reviews. >> > > Indeed. > > I did not check if the comments have been applied though, this is a bit >> too much for me now... >> > > Sure. I was reviewing v7 of this patch, to start with I found following white space errors when applying with git apply, /home/edb/Desktop/patches/others/pgbench-into-7.patch:66: trailing whitespace. char *line; /* first line for short display */ /home/edb/Desktop/patches/others/pgbench-into-7.patch:67: trailing whitespace. char *lines; /* full multi-line text of command */ /home/edb/Desktop/patches/others/pgbench-into-7.patch:72: trailing whitespace. int compound; /* last compound command (number of \;) */ /home/edb/Desktop/patches/others/pgbench-into-7.patch:73: trailing whitespace. char **gset; /* per-compound command prefix */ /home/edb/Desktop/patches/others/pgbench-into-7.patch:81: trailing whitespace. /* read all responses from backend */ error: patch failed: doc/src/sgml/ref/pgbench.sgml:815 error: doc/src/sgml/ref/pgbench.sgml: patch does not apply error: patch failed: src/bin/pgbench/pgbench.c:375 error: src/bin/pgbench/pgbench.c: patch does not apply error: patch failed: src/bin/pgbench/pgbench.h:11 error: src/bin/pgbench/pgbench.h: patch does not apply error: patch failed: src/fe_utils/psqlscan.l:678 error: src/fe_utils/psqlscan.l: patch does not apply error: patch failed: src/include/fe_utils/psqlscan_int.h:112 error: src/include/fe_utils/psqlscan_int.h: patch does not apply Apart from that, on executing SELECT 1 AS a \gset \set i debug(:a) SELECT 2 AS a \gcset SELECT 3; given in your provided script gset-1.sql. it is giving error Invalid command \gcset. Not sure what is the intention of this script anyway? Also, instead of so many different files for error why don't you combine it into one. -- Regards, Rafia Sabih EnterpriseDB: http://www.enterprisedb.com/
Commits
-
pgbench: Remove \cset
- 25ee70511ec2 12.0 landed
-
pgbench: add \cset and \gset commands
- 6260cc550b0e 12.0 landed
-
Adjust pgbench to allow non-ASCII characters in variable names.
- 9d36a386608d 11.0 landed
-
Refactor script execution state machine in pgbench.
- 12788ae49e19 10.0 cited
-
Allow empty queries in pgbench.
- 6471045230f5 10.0 cited