Re: trailing comment ghost-timing - Mailing list pgsql-hackers

From Andres Freund
Subject Re: trailing comment ghost-timing
Date
Msg-id 20131224152717.GI26564@alap2.anarazel.de
Whole thread Raw
In response to Re: trailing comment ghost-timing  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: trailing comment ghost-timing
List pgsql-hackers
> The real question is whether we shouldn't suppress the whole PQexec.
> I believe this is very closely related to the question of what we do
> with a comment preceding the next command.  Try this experiment:

> regression=# /* block comment here */
> regression-# select 2+2;

> regression=# -- dash comment here
> regression=# select 3+3;

> and then look in the postmaster log:
> 
> LOG:  statement: /* block comment here */
>         select 2+2;
> LOG:  statement: select 3+3;
> 
> This is inconsistent, IMO.  I think if we were to fix things so that
> leading block comments were dropped the same way -- comments are, that
> would also take care of the behavior complained of in this thread.
> There's been some previous discussion of this point, I think.

FWIW, I find dropping comments a rather annoying behaviour. I'd rather
include dash comments in the statements sent to the server than start
dropping block comments.
It's not uncommon to annotate statements with additional information
using comments for log analysis. Sure, most of that isn't sent via psql,
but it's imo still surpising when testing or re-executing stuff from the log.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: varattno remapping
Next
From: Fabien COELHO
Date:
Subject: Re: ISN extension bug? (with patch)