Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
Date
Msg-id 1816979.1592680000@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names  (Euler Taveira <euler.taveira@2ndquadrant.com>)
Responses Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Euler Taveira <euler.taveira@2ndquadrant.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



pgsql-bugs by date:

Previous
From: Euler Taveira
Date:
Subject: Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
Next
From: Tom Lane
Date:
Subject: Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names