Re: PATCH: pgbench allow '=' in \set

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: pgbench allow '=' in \set
Date: 2015-05-07 18:25:07
Message-ID: CAFj8pRAnzWezEufM67qNESFAi=7y0NeK5Rpn_2k5=hs73jg=PQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2015-05-07 20:18 GMT+02:00 Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>:

>
> Hello devs,
>
> Since an expression syntax has been added to pgbench, I find that the
> readability of expressions is not great. An extra '=' improves the
> situation for me:
>
> \set id = 1 + abs((:id * 1021) % (100000 * :scale))
>
> seems slightly better than:
>
> \set id 1 + abs((:id * 1021) % (100000 * :scale))
>
> But that is debatable!
>
> The attached patch just ignores a leading '=' in a pgbench expression.
>

It is question :( - it break a consistency with psql

Regards

Pavel

>
> --
> Fabien.
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-05-07 18:32:18 Re: INSERT ... ON CONFLICT error messages
Previous Message Tom Lane 2015-05-07 18:24:32 Re: EvalPlanQual behaves oddly for FDW queries involving system columns