Re: Add a semicolon to query related to search_path

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add a semicolon to query related to search_path
Дата
Msg-id 4388.1534339660@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Add a semicolon to query related to search_path  (Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp>)
Ответы Re: Add a semicolon to query related to search_path
Список pgsql-hackers
Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp> writes:
> Attached patch gives the following query a semicolon for readability.
>    s/SELECT pg_catalog.set_config ('search_path', '', false)/
>      SELECT pg_catalog.set_config ('search_path', '', false);/

I'm not exactly convinced that this is worth doing.  There are an
awful lot of queries issued by our various client tools, and there's
basically no consistency as to whether they use trailing semicolons
or not.  I do not think it is a useful exercise to try to impose
such consistency, even assuming that we could settle on which way
is better.  (I do not necessarily buy your assumption that
with-semicolon is better.)

A concrete reason not to do that is that if we only ever test one
way, we might accidentally break the backend's handling of the
other way.  Admittedly, we'd have to get close to 100% consistency
before that became a serious hazard, but what's the point of moving
the needle just a little bit?

            regards, tom lane


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

Предыдущее
От: Andrew Gierth
Дата:
Сообщение: Re: Fix quadratic performance of regexp match/split functions
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Expression errors with "FOR UPDATE" and postgres_fdw withpartition wise join enabled.