> 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers