Re: pgbench - allow to store select results into variables

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: pgbench - allow to store select results into variables
Дата
Msg-id alpine.DEB.2.20.1607091441480.3412@sto
обсуждение исходный текст
Ответ на Re: pgbench - allow to store select results into variables  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: pgbench - allow to store select results into variables  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
>> Also a more subjective argument: I do not like the gset automagic naming
>> feature. I got more inspired by PL/pgSQL and ECPG which both have an "into"
>> syntax with explicit variable names that let nothing to guessing. I like
>> things to be simple and explicit, hence the proposed into.
>
> the gset was originally designed differently - but now it is here - and it
> is not practical to have two different, but pretty similar statements in
> psql and pgbench.

In my view they are unrelated: on the one hand "gset" is really an 
interactive feature, where typing is costly so "automagic" might make 
sense; on the other hand "into" is a scripting feature, where you want to 
understand the code and have something as readable as possible, without 
surprises.

The commands are named differently and behave differently.

If someone thinks that "gset" is a good idea for pgbench, which I don't, 
it could be implemented. I think that an "into" feature, like PL/pgSQL & 
ECPG, makes more sense for scripting.

-- 
Fabien.



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: pgbench - allow to store select results into variables
Следующее
От: Stefan Keller
Дата:
Сообщение: Re: Forthcoming SQL standards about JSON and Multi-Dimensional Arrays (FYI)