Re: Correct handling of blank/commented lines in PSQL interactive-mode history - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Correct handling of blank/commented lines in PSQL interactive-mode history
Date
Msg-id 1260407.1638201524@sss.pgh.pa.us
Whole thread Raw
In response to Re: Correct handling of blank/commented lines in PSQL interactive-mode history  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Correct handling of blank/commented lines in PSQL interactive-mode history
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I wonder if these things would be easier to deal with or more convenient
> if we thought of -- as starting a line-scoped comment, and /* */ as
> starting a query-scoped comment, and treat both types differently.  That
> is, a -- comment would not be part of the subsequent command (and they
> would become two separate history entries), but a /* */ comment would be
> part of the command, and so both the comment and the query would be
> saved as a single history entry.

The hack I was fooling with yesterday would have had that effect,
although it was a consequence of the fact that I was too lazy
to parse slash-star comments ;-).  But basically what I was
trying to do was to force a line that was only whitespace
(possibly plus dash-dash comment) to be treated as a separate
history entry, while not suppressing dash-dash comments
altogether as the current code does.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Arne Roland
Date:
Subject: Re: Enforce work_mem per worker
Next
From: Mark Dilger
Date:
Subject: Re: Non-superuser subscription owners