Re: trailing comment ghost-timing

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: trailing comment ghost-timing
Date: 2014-03-31 18:06:28
Message-ID: 20140331180628.GB18559@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 28, 2013 at 08:20:59PM -0500, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > On 2013-12-24 12:27:59 -0500, Tom Lane wrote:
> >> What I was proposing was that we do include comments in what we send,
> >> as long as those comments are embedded in the statement text, not
> >> on lines before it.
>
> > The common way I've seen what I've described above done as is something
> > like:
> > /* File:path/to/some/file.whatever Function:foo::something()
> > * Comment: Expensive, but that's ok!
> > */
> > SELECT here_comes FROM my WHERE some_sql;
>
> > If I unerstood what you propose correctly, we'd now drop that comment,
> > where we sent it before?
>
> Yeah. But I just noticed that this would cause the regression test
> results to change dramatically --- right now, most "-- comment" comments
> get echoed to the output, and that would stop. So maybe it's not such
> a great idea after all.

Where are we on this? It seem odd that psql sends /* */ comments to the
server, but not "--" comments. Should this be documented or changed?

I am confused why changing the behavior would affect the regression test
output as -- and /* */ comments already appear, and it was stated that
"--" comments are already not sent to the server.

Everyone agreed that suppressing \timing output for a PGRES_EMPTY_QUERY
return result was not a good idea.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-03-31 18:08:47 Re: doPickSplit stack buffer overflow in XLogInsert?
Previous Message Sergey Konoplev 2014-03-31 18:01:56 Re: Cube extension kNN support