Re: [HACKERS] psql and comments - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] psql and comments
Date
Msg-id 29724.939317736@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] psql and comments  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] psql and comments
List pgsql-hackers
>> Things aren't a big problem the way they stand, but istm that a
>> completely blank line (after stripping single-line comments) may as
>> well be the same as an empty line,and that psql could figure that out.

There was talk earlier of changing the behavior so that psql would
forward comments to the backend, rather than stripping them.  One
potential annoyance if we do that is that (I think) all the regress
test expected outputs will change because comments will then appear
in them.

I'd be inclined to maintain the current behavior.  psql has to have a
simple parser in it anyway to know when it has a complete query it can
send to the backend --- so it must know what is a comment and what is
not.  Removing the comments is not really going to add much complexity
AFAICS.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] union and LIMIT problem
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] union and LIMIT problem