Re: pgbench - allow backslash continuations in \set expressions
От
Fabien COELHO
Тема
Re: pgbench - allow backslash continuations in \set
expressions
Дата
Msg-id
alpine.DEB.2.20.1611011311080.9978@lancre
Ответ на
Список
Дерево обсуждения
pgbench - allow backslash continuations in \set expressions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow backslash continuations in \set
expressions Christoph Berg <myon@debian.org>
Re: pgbench - allow backslash continuations in \set
expressions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow backslash continuations in \set
expressions Christoph Berg <myon@debian.org>
Re: pgbench - allow backslash continuations in \set expressions Rafia Sabih <rafia.sabih@enterprisedb.com>
Re: pgbench - allow backslash continuations in \set
expressions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow backslash continuations in \set
expressions Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - allow backslash continuations in \set expressions Rafia Sabih <rafia.sabih@enterprisedb.com>
Re: pgbench - allow backslash continuations in \set
expressions Fabien COELHO <coelho@cri.ensmp.fr>
Hello Rafia, > Well with this new approach, the example you gave previously for better > readability: > >> \set bid >> CASE WHEN random(0, 99) < 85 >> THEN :tbid >> ELSE :abid + (:abid >= :tbid) >> END > > will give error at the first line. Indeed you are right for the patch I sent, but it is ok if the initial state is COEX, i.e. it does not allow an empty expression. > In general, this new approach is likely to create confusions in such > cases. See attached version. > As an end-user one needs to be real careful to check what portions have > to split between lines. Keeping this in mind, I'd prefer the previous > approach. I will not fight over this one. I like it in "scala", though, and I find it rather elegant, especially as backslashes are quite ugly. Another reason not to take it is that it would be much harder to have that in psql as well. -- Fabien.
В списке pgsql-hackers по дате отправления