small explain patch

Started by Liam Stewartabout 24 years ago4 messagespatches
Jump to latest
#1Liam Stewart
liams@redhat.com

Attached is a small patch that clarifies EXPLAIN output a little bit.
Output can be a bit confusing if there are spaces in table and index
names and aliases so the names in question are surrounded by ' '.
Aliases are explicitly labelled.

Liam

--
Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com

Attachments:

patch.txttext/plain; charset=us-asciiDownload+8-8
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Liam Stewart (#1)
Re: small explain patch

Liam Stewart <liams@redhat.com> writes:

Attached is a small patch that clarifies EXPLAIN output a little bit.
Output can be a bit confusing if there are spaces in table and index
names and aliases so the names in question are surrounded by ' '.

If we do this, we should use double quotes "...". A double-quoted
string is an identifier, a single-quoted string is a literal; and
it doesn't help anyone for the system's messages to get it backwards.
(I've been intending for awhile to fix all the elog messages that get
this wrong.)

How would you feel about quoting only if necessary
(cf. quote_identifier)?

Aliases are explicitly labelled.

I think that's just noise. The explain output is verbose enough without
adding noise words...

regards, tom lane

#3Liam Stewart
liams@redhat.com
In reply to: Tom Lane (#2)
Re: small explain patch

On Thu, May 02, 2002 at 05:42:13PM -0400, Tom Lane wrote:

If we do this, we should use double quotes "...". A double-quoted
string is an identifier, a single-quoted string is a literal; and
it doesn't help anyone for the system's messages to get it backwards.
(I've been intending for awhile to fix all the elog messages that get
this wrong.)

Sure.

How would you feel about quoting only if necessary
(cf. quote_identifier)?

That would work nicely. I didn't put the call to quote_identifier inside
the stringStringInfo macro.

Aliases are explicitly labelled.

I think that's just noise. The explain output is verbose enough without
adding noise words...

Hmm.. I kinda like having it there, but you are right in that it isn't
neccessary and doesn't add much. I'll live with it being out.

Liam

--
Liam Stewart :: Red Hat Canada, Ltd. :: liams@redhat.com

Attachments:

patch.txttext/plain; charset=us-asciiDownload+8-8
#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Liam Stewart (#3)
Re: small explain patch

Liam Stewart <liams@redhat.com> writes:

How would you feel about quoting only if necessary
(cf. quote_identifier)?

That would work nicely. I didn't put the call to quote_identifier inside
the stringStringInfo macro.

Actually, stringStringInfo seems entirely pointless here; the result of
RelationGetRelationName can't be NULL. The other places where it's
being used seem pointless as well. I removed it while applying your
patch...

regards, tom lane