Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Euler Taveira <euler.taveira@2ndquadrant.com>,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>,
Maciek Sakrejda <m.sakrejda@gmail.com>
Date: 2020-06-21T14:29:17Z
Lists: pgsql-bugs
Julien Rouhaud <rjuju123@gmail.com> writes: > It turns out that in hypopg I totally missed that > explain_get_index_name_hook should take care of quoting the indexname. > People only want to know whether the hypothetical index is used or > not, so the lack of correct quoting didn't prevent that (the > hypothetical index name is automatically generated and includes its > oid). The patch looks good to me, and +1 for backpatch! Ah, I'd wondered whether there might be hook users that "should" be doing quoting and were not. So the impact on hypopg would be: 1. Non-text EXPLAIN formats are already properly quoted, and will remain so. 2. Text-format EXPLAIN output will grow double-quotes around the hypothetical index names, which are not there at present (I believe, but didn't test it). This shouldn't bother human users particularly, but conceivably it might break hypopg's regression tests? According to codesearch.debian.net and a Google search, hypopg is the only active external user of explain_get_index_name_hook. (I should have thought to do that search yesterday, but did not.) regards, tom lane
Commits
-
Undo double-quoting of index names in non-text EXPLAIN output formats.
- dda25c599fcf 9.5.23 landed
- d3d8755180b6 12.4 landed
- bd53ea2b270f 9.6.19 landed
- 6d9f7a094ca7 10.14 landed
- 63d2ac23b018 14.0 landed
- 57f8b9913b91 13.0 landed
- 35a8e227e6c6 11.9 landed