Re: Correct handling of blank/commented lines in PSQL interactive-mode history
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>,
"David G. Johnston" <david.g.johnston@gmail.com>,
Greg Nancarrow <gregn4422@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-09-17T09:11:35Z
Lists: pgsql-hackers
On 07.09.21 21:16, Tom Lane wrote: > [ this is a digression from the main point of the thread, but ... ] > > Alvaro Herrera <alvherre@alvh.no-ip.org> writes: >> I am particularly bothered by the uselessness >> that M-# results in -- namely, inserting a # at the start of the buffer. > > Fixing that might be as simple as the attached. I've not beat on > it hard though. I see this in my .inputrc, although I don't remember when/how I put it there: $if psql set comment-begin -- set expand-tilde on $endif
Commits
-
psql: initialize comment-begin setting to a useful value by default.
- 3d858af07ee6 15.0 landed
-
psql: treat "--" comments between queries as separate history entries.
- c2f654930e9f 15.0 landed
-
psql: include intra-query "--" comments in what's sent to the server.
- 83884682f4df 15.0 landed