Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)
Date
Msg-id 20230515141457.ovpznndsvulahbpk@alvherre.pgsql
Whole thread Raw
In response to Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)
List pgsql-hackers
On 2023-May-15, Tom Lane wrote:

> Laurenz Albe <laurenz.albe@cybertec.at> writes:
> > On Mon, 2023-05-15 at 08:37 +0200, Pavel Stehule wrote:
> >> This looks little bit strange
> >> 
> >> What about /* comments
> >> Like
> >> /******* Query ********/
> >> Or just
> >> -------- Query --------
> 
> > +1 for either of Pavel's suggestions.
> 
> +1.  Probably the slash-star way would be less visually surprising
> to people who are used to the current output.

It's worth considering what will readline history do with the comment.
As I recall, we keep /* comments */ together with the query that
follows, but the -- comments are keep in a separate history entry.
So that's one more reason to prefer /*  */

(To me, that also suggests to remove the asterisk line after each query,
and to keep just the one before.)

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Sallah, I said NO camels! That's FIVE camels; can't you count?"
(Indiana Jones)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)
Next
From: Jehan-Guillaume de Rorthais
Date:
Subject: Re: Memory leak from ExecutorState context?