Re: pgbench - allow to store select results into variables
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tatsuo Ishii <ishii@sraoss.co.jp>
Cc: rafia.sabih@enterprisedb.com, michael.paquier@gmail.com,
tgl@sss.pgh.pa.us,
Langote_Amit_f8@lab.ntt.co.jp, robertmhaas@gmail.com,
pavel.stehule@gmail.com,
PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2017-04-17T06:40:31Z
Lists: pgsql-hackers
Attachments
- pgbench-into-10.patch (text/x-diff) patch
- gset-1.sql (application/x-sql)
>> It seems the new feature \gset doesn't work with tables having none
>> ascii column names:
>
> Indeed. The same error is triggered with the \set syntax, which does not
> involve any query execution.
>
> I have added a sentence mentionning the restriction when variables are first
> discussed in the documentation, see attached patch.
Here is a v10:
- does not talk about ASCII variable name constraint, as a patch has been
submitted independently to lift this constraint.
- rename gcset to cset (compound set, \; + \set), where gset is ; + \set,
because "\gcset" looked really strange.
- simplify the code a little bit.
Also attached is an updated test script.
--
Fabien.
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