pgbench - allow to store select results into variables

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема pgbench - allow to store select results into variables
Дата
Msg-id alpine.DEB.2.20.1607091005330.3412@sto
обсуждение исходный текст
Ответы Re: pgbench - allow to store select results into variables  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Hello devs,

I mentionned my intention to add some features to pgbench back in March:
https://www.postgresql.org/message-id/alpine.DEB.2.10.1603301618570.5677@sto

The attached patch adds an \into meta command to store results of
preceding SELECTs into pgbench variables, so that they can be reused
afterwards.

The feature is useful to make more realistic scripts, currently pgbench
script cannot really interact with the database as results are discarded.

The chosen syntax is easy to understand and the implementation is quite
light, with minimal impact on the code base. I think that this is a
reasonnable compromise.

The SELECTs must yield exactly one row, the number of variables must be
less than the number of columns.

Also attached a set of test scripts, especially to trigger various error
cases.

--
Fabien.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: pgbench - minor doc improvements
Следующее
От: Fabien COELHO
Дата:
Сообщение: pgbench - compute & show latency consistently