pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Euler Taveira <euler.taveira@2ndquadrant.com>
Cc: pgsql-bugs@lists.postgresql.org
Cc: m.sakrejda@gmail.com
Subject: Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
Date: Sat, 20 Jun 2020 15:06:40 -0400
Message-ID: <1816979.1592680000@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH503wCS_XAQkFtH5xFeiL52tQpYc_qRbdFt3X-e8vfUP9pMdA@mail.gmail.com>
References: <16502-57bd1c9f913ed1d1@postgresql.org>
	<CAH503wCS_XAQkFtH5xFeiL52tQpYc_qRbdFt3X-e8vfUP9pMdA@mail.gmail.com>

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





view thread (11+ messages)  latest in thread

Message-ID: <1816979.1592680000@sss.pgh.pa.us>
Permalink:  ../1816979.1592680000@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1816979.1592680000@sss.pgh.pa.us

 · 

reply

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, 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: <1816979.1592680000@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