Re: pgbench - allow to store select results into variables
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: 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-01-04T21:15:58Z
Lists: pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.fr> writes: > Indeed. Here is the rebased version, which still get through my various > tests. I looked through this again, and I still think that the syntactic design of the new command is seriously misguided, leading to an ugly and unmaintainable implementation that may well block further innovation in pgbench. I will not commit it in this form. Possibly you can find some other committer whom you can convince this is a good design --- but since the patch has gone untouched for two full commitfest cycles, I rather imagine that whoever else has looked at it has likewise decided they didn't want to be responsible for it. Please look at changing \into to be a SQL-command-ending backslash command as we previously discussed. I think you will find that the implementation is a great deal simpler that way and doesn't require weird hackery on the shared lexer. (BTW, said hackery is not just weird but broken. You can't simply remove comments. Consider something like "SELECT foo/*as*/bar". This code reduces that to "SELECT foobar" which is wrong.) If you won't do that, and you can't find another committer who will accept responsibility for this patch before the end of the current commitfest, I think we should mark it Rejected. regards, tom lane
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