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 CACLU5mTw+RX-yhkgHLqEfMXhSk66MnV=_5Ev9McYoGiR-W8jXw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: psql: Could we get "-- " prefixing on the **** QUERY **** outputs? (ECHO_HIDDEN)  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
Список pgsql-hackers
On Wed, May 17, 2023 at 2:13 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> You removed the ******** QUERY ******** at the end of the query.

Fixed 
Also Fixed Pavel's name.
Also Added Laurenze as a Reviewed By: (not sure, never want to NOT ack someone)

Also, you'd have to avoid copying-and-pasting the query output
anyway, so I'm not entirely sold that there's much of
a usability gain here.
 
My output never contains query output results intermixed.  I get a handful of queries.
Then I get the output of the "\d t1"  (Which makes me wonder if I am doing something wrong,
or there is another use case I should be testing).

I labelled this v2.  I also edited the Thread: (I realized I can find the thread, go to the Whole Thread,
and then include the link to the first item in the thread.  I assume that is what's expected).

Kirk...

psql> 
create table t1(id bigint not null primary key generated always as identity);
\set ECHO_HIDDEN on
\d t1

Generates:
/********* QUERY **********/
... Clipped ...
FROM pg_catalog.pg_publication p
WHERE p.puballtables AND pg_catalog.pg_relation_is_publishable('24577')
ORDER BY 1;
/**************************/

/********* 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"
 ... End Clip...
-- NOTICE: there is no output between queries using ECHO_HIDDEN
Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: run pgindent on a regular basis / scripted manner
Следующее
От: "Joel Jacobson"
Дата:
Сообщение: Re: Should CSV parsing be stricter about mid-field quotes?