From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Euler Taveira <euler.taveira@2ndquadrant.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Cc: Maciek Sakrejda <m.sakrejda@gmail.com>
Subject: Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
Date: Sun, 21 Jun 2020 10:29:17 -0400
Message-ID: <1882414.1592749757@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOBaU_YyjV1fHe_vz8TtfxdSKZFP0UZirCJwne279s0-4cRwuA@mail.gmail.com>
References: <16502-57bd1c9f913ed1d1@postgresql.org>
<CAH503wCS_XAQkFtH5xFeiL52tQpYc_qRbdFt3X-e8vfUP9pMdA@mail.gmail.com>
<1816979.1592680000@sss.pgh.pa.us>
<1845717.1592691069@sss.pgh.pa.us>
<CAOBaU_YyjV1fHe_vz8TtfxdSKZFP0UZirCJwne279s0-4cRwuA@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, rjuju123@gmail.com, euler.taveira@2ndquadrant.com, pgsql-bugs@lists.postgresql.org, m.sakrejda@gmail.com
Subject: Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
In-Reply-To: <1882414.1592749757@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox