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

Поиск
Список
Период
Сортировка
От Kirk Wolak
Тема Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)
Дата
Msg-id CACLU5mRhBiYjh-Cq7yvnGUA3VqX44Gh3QFkzmViP4ZNjdiJ7mw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)  (Kirk Wolak <wolakk@gmail.com>)
Ответы Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-hackers
On Mon, May 15, 2023 at 9:05 PM Kirk Wolak <wolakk@gmail.com> wrote:
On Mon, May 15, 2023 at 10:28 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> It's worth considering what will readline history do with the comment.

Hmmm... We could put a SPACE before the comment, that usually stops readline from saving it?

Meh ... the one after serves to separate a query from its output.

                        regards, tom lane


I just tested whether or not you see the trailing comment line.  And I ONLY see it in the windows version of PSQL.
And ONLY if you paste it directly in at the command line.
[Because it sends the text line by line, I assume]

,,,With that said, I DEFINITELY Move to Remove the secondary comment.  It's just noise.
and /* */ comments it will be for the topside.


Here's the patch.  I removed touching on .po files.
I made the change apply to the logging (fair warning) for consistency.

All feedback is welcome.  These small patches help me work through the process.

Kirk...
OUTPUT:
/********* QUERY **********/
SELECT c.oid::pg_catalog.regclass
FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i
WHERE c.oid = i.inhparent AND i.inhrelid = '24577'
  AND c.relkind != 'p' AND c.relkind != 'I'
ORDER BY inhseqno;

/********* QUERY **********/
SELECT c.oid::pg_catalog.regclass, c.relkind, inhdetachpending, pg_catalog.pg_get_expr(c.relpartbound, c.oid)
FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i
WHERE c.oid = i.inhrelid AND i.inhparent = '24577'
ORDER BY pg_catalog.pg_get_expr(c.relpartbound, c.oid) = 'DEFAULT', c.oid::pg_catalog.regclass::pg_catalog.text;

                           Table "public.t1"
 Column |  Type  | Collation | Nullable |           Default            
--------+--------+-----------+----------+------------------------------
 id     | bigint |           | not null | generated always as identity
Indexes:
    "t1_pkey" PRIMARY KEY, btree (id)

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Possible regression setting GUCs on \connect
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Should CSV parsing be stricter about mid-field quotes?