Questions about "EXPLAIN" - Mailing list pgsql-general

From David Johnston
Subject Questions about "EXPLAIN"
Date
Msg-id 030601cca3e4$de2b9190$9a82b4b0$@yahoo.com
Whole thread Raw
List pgsql-general
Hey,

PostgreSQL 9.0

1) While comparing a simple GROUP/COUNT query I noticed that TEXT and JSON
formats identify the Top-Level Plan Node differently (GroupAggregate vs.
Aggregate).  More curiosity than anything but I would have expected them to
match.

2) For the same query I was hoping to be able to get the defined alias for
the "COUNT" output column but instead the "OUTPUT" simply gives the
expression.  Is there some way to get EXPLAIN to output the final column
names or, assuming that this has been discussed previously (likely), could
someone link to one or more threads with the discussion as to why it has not
been done (or give a brief synopsis).

Thanks,

David J.
++++++++++++++++++++++++++++
QUERY PLAN (TEXT) [Sample]
GroupAggregate  (cost=4.27..9.64 rows=2 width=64)
  Output: sqllibrary_query_name, count(sqllibrary_query_version)
++++++++++++++++++++++++++++
QUERY PLAN (JSON) [Sample]
[
  {
    "Plan": {
      "Node Type": "Aggregate",
      "Strategy": "Sorted",
      "Startup Cost": 4.27,
      "Total Cost": 9.64,
      "Plan Rows": 2,
      "Plan Width": 64,
      "Output": ["sqllibrary_query_name",
"count(sqllibrary_query_version)"],
++++++++++++++++++++++++++++



pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: syntax highlighting in emacs after \e in psql
Next
From: "J.V."
Date:
Subject: how to drop function?