Re: pgbench - allow to store select results into variables

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Rafia Sabih <rafia.sabih@enterprisedb.com>
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-24T15:29:22Z
Lists: pgsql-hackers

Attachments

Hello Rafia,

> if (my_command->argc > 2)
> + syntax_error(source, lineno, my_command->line, my_command->argv[0],
> + "at most on argument expected", NULL, -1);
>
> I suppose you mean 'one' argument here.

Indeed.

> Apart from that indentation is not correct as per pgindent, please check.

I guess that you are refering to switch/case indentation which my emacs 
does not do as expected.

Please find attached a v8 which hopefully fixes these two issues.

-- 
Fabien.

Commits

  1. pgbench: Remove \cset

  2. pgbench: add \cset and \gset commands

  3. Adjust pgbench to allow non-ASCII characters in variable names.

  4. Refactor script execution state machine in pgbench.

  5. Allow empty queries in pgbench.