Re: [HACKERS] pgbench - allow backslash continuations in \set expressions

Поиск
Список
Период
Сортировка
От Rafia Sabih
Тема Re: [HACKERS] pgbench - allow backslash continuations in \set expressions
Дата
Msg-id CAOGQiiP6XJQ6ETqDb2OtVo9KKumfDkmK+DPnLT49GdFteYs8fA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgbench - allow backslash continuations in \set expressions  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: [HACKERS] pgbench - allow backslash continuations in \setexpressions  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Sat, Dec 3, 2016 at 1:52 PM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
>
>> FWIW, I looked a bit further and concluded that probably psqlscan.l
>> doesn't need to be modified; so likely you could do this across all of
>> pgbench's commands without touching psql.  That might be an acceptable
>> compromise for now, though I still think that as soon as we have this
>> for pgbench, users will start wanting it in psql.
>
>
> The attached patch adds backslash-return (well newline really) continuations
> to all pgbench backslash-commands.
>
> The attached test uses continuations on all such commands (sleep set
> setshell and shell).
>
> I think that adding continuations to psql should be a distinct patch.
>
> --
> Fabien.

Hello Fabien,
The patch does not apply on the latest head, I guess this requires
rebasing since yours is posted in December. Again, it is giving
trailing whitespace errors (as I reported for the earlier version),
plus it does not apply with git apply, hopefully that would be fixed
once rebased.
Other than that, I observed that if after backslash space is there,
then the command fails. I think it should be something like if after
backslash some spaces are there, followed by end-of-line then it
should ignore these spaces and read next line, atleast with this new
meaning of backslash. Otherwise, it should be mentioned in the docs
that backslash should not be followed by space.

-- 
Regards,
Rafia Sabih
EnterpriseDB: http://www.enterprisedb.com/



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] WARM and indirect indexes
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] postgres_fdw bug in 9.6