Re: pgbench - allow to store select results into variables
Tatsuo Ishii <ishii@sraoss.co.jp>
From: Tatsuo Ishii <ishii@sraoss.co.jp>
To: fabien.coelho@mines-paristech.fr
Cc: tgl@sss.pgh.pa.us, rafia.sabih@enterprisedb.com,
michael.paquier@gmail.com, Langote_Amit_f8@lab.ntt.co.jp,
robertmhaas@gmail.com, pavel.stehule@gmail.com,
pgsql-hackers@postgresql.org
Date: 2017-04-09T23:32:19Z
Lists: pgsql-hackers
Fabien, >> As the variable infrastructures are pretty different between psql & >> pgbench (typed vs untyped values, sorted array vs linked list data >> structure, no hook vs 2 hooks, name spaces vs no such thing...), I >> have chosen the simplest option of just copying the name checking >> function and extending the lexer to authorize non-ascii letters, so >> that psql/pgbench would accept the same variable names with the same >> constraint about encodings. >> >> See patch attached & test script. > > Argh, I'm jet-lagged, wrong patch suffix... Here it is with the right > suffix. Thank you for the patch. I tested a little bit and found that it does not allow value replacement against non ascii variables in given SQL statements . Is it intentional? If not, I think you need to fix parseVariable() as well. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp
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