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: Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, m(dot)sakrejda(at)gmail(dot)com
Subject: Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
Date: 2020-06-20 19:06:40
Message-ID: 1816979.1592680000@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com> writes:
> Indeed, relation names should return the same. The fact that
> explain_get_index_name always calls quote_identifier is the culprit; it
> should call quote_identifier only when the format is TEXT. Patch is
> attached.

Agreed as to the bug, but I think we ought to fix it by redefining
explain_get_index_name's API as "return the bare index name always",
and let the callers apply quoting. The callers seem to all have
separate code paths for text format already. Furthermore, if
explain_get_index_name needs to have different behavior for text
format, that requirement propagates to explain_get_index_name_hook
functions --- and I don't think we want to change the signature
for that hook.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-06-20 22:11:09 Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
Previous Message Euler Taveira 2020-06-20 18:22:17 Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names