Re: Correct handling of blank/commented lines in PSQL interactive-mode history

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Greg Nancarrow <gregn4422@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Laurenz Albe <laurenz.albe@cybertec.at>, "David G. Johnston" <david.g.johnston@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-11-30T21:35:13Z
Lists: pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Mon, Nov 29, 2021 at 11:12:35PM -0500, Tom Lane wrote:
>> Interesting.  I can probably adjust my MUA to send "text/x-patch",
>> but I'll have to look around to see where that's determined.

> I would be interesting to know if "text/x-patch" is better than
> "text/x-diff" --- I currently use the later.

I found out that where that is coming from is "file -i", so I'm a
bit loath to modify it.  Is there any hard documentation as to why
"text/x-patch" should be preferred?

			regards, tom lane



Commits

  1. psql: initialize comment-begin setting to a useful value by default.

  2. psql: treat "--" comments between queries as separate history entries.

  3. psql: include intra-query "--" comments in what's sent to the server.