Re: BUG #16502: EXPLAIN JSON format adds extra quotes around index names
Euler Taveira <euler.taveira@2ndquadrant.com>
From: Euler Taveira <euler.taveira@2ndquadrant.com>
To: pgsql-bugs@lists.postgresql.org
Cc: m.sakrejda@gmail.com
Date: 2020-06-20T18:22:17Z
Lists: pgsql-bugs
Attachments
- 0001-EXPLAIN-JSON-format-should-not-add-quotes-in-index-n.patch (text/x-patch) patch 0001
On Thu, 18 Jun 2020 at 16:50, PG Bug reporting form <noreply@postgresql.org> wrote: > > I ran into this in 12.3, but it looks like it's still the case in HEAD. It > looks like this is because `explain_get_index_name` in `explain.c` always > quotes the index name, regardless of the format being used. I'd send a > patch, but I'm not sure how `explain_get_index_name_hook` should fit into > this. > > 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. I'm not sure if it should be backpatched to released versions because there should be applications that rely on this format. However, it would be good to backpatch it to v13 too. -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Undo double-quoting of index names in non-text EXPLAIN output formats.
- dda25c599fcf 9.5.23 landed
- d3d8755180b6 12.4 landed
- bd53ea2b270f 9.6.19 landed
- 6d9f7a094ca7 10.14 landed
- 63d2ac23b018 14.0 landed
- 57f8b9913b91 13.0 landed
- 35a8e227e6c6 11.9 landed