Re: Add a semicolon to query related to search_path - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add a semicolon to query related to search_path
Date
Msg-id 4388.1534339660@sss.pgh.pa.us
Whole thread Raw
In response to Add a semicolon to query related to search_path  (Tatsuro Yamada <yamada.tatsuro@lab.ntt.co.jp>)
Responses Re: Add a semicolon to query related to search_path
List 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 by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Fix quadratic performance of regexp match/split functions
Next
From: Robert Haas
Date:
Subject: Re: Expression errors with "FOR UPDATE" and postgres_fdw withpartition wise join enabled.