Re: [HACKERS] pgbench - allow to store select results into variables
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>,
Michael Paquier <michael@paquier.xyz>,
Stephen Frost <sfrost@snowman.net>,
Andrew Dunstan <andrew.dunstan@2ndquadrant.com>,
PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2019-01-10T19:14:25Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes: > On 2019-Jan-10, Tom Lane wrote: >> This \cset thing seem like an incredibly badly thought out kluge. >> What is its excuse to live? > The reason is that you can set variables from several queries in one > network trip. So who needs that? Just merge the queries, if it's so important that you avoid multiple round trips. > We can take it out I guess, but my impression was that we already pretty > much had a consensus that it was wanted. Maybe if the implementation weren't a pile of junk it'd be all right, but as-is this is a mess. The dependency on counting \; in particular is setting me off, because that has little if anything to do with the number of query results to be expected. I imagine the argument will be that nobody would write the sort of queries that break that assumption in a pgbench script; but I don't find that kind of design to be up to project standards, especially not when the argument for the feature is tissue-thin in the first place. 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