Re: pgbench - allow to store select results into variables

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: rafia(dot)sabih(at)enterprisedb(dot)com, michael(dot)paquier(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp, robertmhaas(at)gmail(dot)com, 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-04-17 06:40:31
Message-ID: alpine.DEB.2.20.1704171535210.4025@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> 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.

Attachment Content-Type Size
pgbench-into-10.patch text/x-diff 16.0 KB
gset-1.sql application/x-sql 468 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2017-04-17 07:01:22 Re: Variable substitution in psql backtick expansion
Previous Message Fabien COELHO 2017-04-17 06:34:53 Re: pgbench - allow to store select results into variables