Re: pgbench - allow to store select results into variables

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench - allow to store select results into variables
Date: 2017-03-15 19:15:07
Message-ID: alpine.DEB.2.20.1703151958350.17919@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Rafia,

> I was reviewing v7 of this patch, to start with I found following white
> space errors when applying with git apply,
> /home/edb/Desktop/patches/others/pgbench-into-7.patch:66: trailing
> whitespace.

Yep.

I do not know why "git apply" sometimes complains. All is fine for me both
with "git apply" and "patch".

Last time it was because my mailer uses text/x-diff for the mime type, as
define by the system in "/etc/mime.types", which some mailer then
interpret as a license to change eol-style when saving, resulting in this
kind of behavior. Could you tell your mailer just to save the file as is?

> Apart from that, on executing SELECT 1 AS a \gset \set i debug(:a) SELECT 2
> AS a \gcset SELECT 3; given in your provided script gset-1.sql. it is
> giving error Invalid command \gcset.

Are you sure that you are using the compiled pgbench, not a previously
installed one?

bin/pgbench> pgbench -t 1 -f SQL/gset-1.sql
SQL/gset-1.sql:1: invalid command in command "gset"
\gset

bin/pgbench> ./pgbench -t 1 -f SQL/gset-1.sql
starting vacuum...end.
debug(script=0,command=2): int 1
debug(script=0,command=4): int 2
...

> Not sure what is the intention of this script anyway?

The intention is to test that gset & gcset work as expected in various
settings, especially with combined queries (\;) the right result must be
extracted in the sequence.

> Also, instead of so many different files for error why don't you combine
> it into one.

Because a pgbench scripts stops on the first error, and I wanted to test
what happens with several kind of errors.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Emre Hasegeli 2017-03-15 19:26:36 Re: Parallel Bitmap scans a bit broken
Previous Message Robert Haas 2017-03-15 19:05:35 Re: Partition-wise join for join between (declaratively) partitioned tables