From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Tatsuro Yamada <yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Add a semicolon to query related to search_path |
Date: | 2018-08-15 13:27:40 |
Message-ID: | 4388.1534339660@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tatsuro Yamada <yamada(dot)tatsuro(at)lab(dot)ntt(dot)co(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2018-08-15 14:40:40 | Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled. |
Previous Message | Andrew Gierth | 2018-08-15 12:21:45 | Re: Fix quadratic performance of regexp match/split functions |