Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Maciek Sakrejda <m(dot)sakrejda(at)gmail(dot)com>
Subject: Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
Date: 2020-06-21 14:29:17
Message-ID: 1882414.1592749757@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Julien Rouhaud <rjuju123(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Julien Rouhaud 2020-06-21 18:16:53 Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
Previous Message Julien Rouhaud 2020-06-21 06:45:02 Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names