Alvaro Herrera <alvhe...@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