Re: trailing comment ghost-timing

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Erik Rijkers <er(at)xs4all(dot)nl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: trailing comment ghost-timing
Date: 2013-12-24 15:27:17
Message-ID: 20131224152717.GI26564@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2013-12-24 15:29:03 Re: ISN extension bug? (with patch)
Previous Message Dean Rasheed 2013-12-24 15:17:49 Re: varattno remapping