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

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: PATCH: pgbench allow '=' in \set
Дата
Msg-id alpine.DEB.2.10.1505072028160.20788@sto
обсуждение исходный текст
Ответ на Re: PATCH: pgbench allow '=' in \set  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: PATCH: pgbench allow '=' in \set  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список 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.



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Auditing extension for PostgreSQL (Take 2)
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: PATCH: pgbench allow '=' in \set