Re: trailing comment ghost-timing

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: trailing comment ghost-timing
Дата
Msg-id 20131224152717.GI26564@alap2.anarazel.de
обсуждение исходный текст
Ответ на Re: trailing comment ghost-timing  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: trailing comment ghost-timing
Список 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 по дате отправления:

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: varattno remapping
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: ISN extension bug? (with patch)