From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PATCH: pgbench allow '=' in \set |
Date: | 2015-05-07 18:43:02 |
Message-ID: | alpine.DEB.2.10.1505072028160.20788@sto |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello,
>> \set id = 1 + abs((:id * 1021) % (100000 * :scale))
>>
>> seems slightly better than:
>>
>> \set id 1 + abs((:id * 1021) % (100000 * :scale))
>
> It is question :( - it break a consistency with psql
It actually "breaks" nothing as it is purely cosmectic:-)
More seriously, I'm not sure that having a apparent syntatic homogeneity
between psql and pgbench should be a requirement, but that is a point
worth raising.
The syntax are not really the same anyway: for instance "\set" and "\set
NAME" means something for psql but not for pgbench.
Moreover the "\set [NAME [VALUE]]" syntax of psql does not allow an
expression, so it stays quite readable as it is, a situation not
comparable to pgbench with expressions.
So I would tend to fully ignore the similitude between the two as a
guideline, as it is only a simulitude and not a real compatibility issue.
--
Fabien.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2015-05-07 18:51:46 | Re: PATCH: pgbench allow '=' in \set |
Previous Message | Bruce Momjian | 2015-05-07 18:41:17 | Re: Auditing extension for PostgreSQL (Take 2) |