Re: very long record lines in expanded psql output

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: very long record lines in expanded psql output
Дата
Msg-id CAFj8pRBqnZ8cVeyLJaYB_3shh=-ZJmzn7VbYUHUoP9knc_3okg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: very long record lines in expanded psql output  (Platon Pronko <platon7pronko@gmail.com>)
Список pgsql-hackers


čt 5. 8. 2021 v 20:56 odesílatel Platon Pronko <platon7pronko@gmail.com> napsal:
> it can be a fully new format - designed for simple copy from terminal. Some
> like
>
> ====== record: 10 ======
> ------------ proname ------------
> left
> ------------ prosrc  ------------
> $lalalal
> ewqrwqerw
> ewqrwqerqrewq
> $
> ===============

> no, it was proposed for psql

How is this better than "copy (...) to stdout"? E.g.:

$ copy (select * from pg_class limit 1) to stdout;
2619    pg_statistic    11      12016   0       10      2       2619    0       18      402     18      2840    t       f       p       r       31      0       f       f       f       f       f       t       n       f0      478     1       {postgres=arwdDxt/postgres}     \N      \N

You can still copy the necessary parts (using mouse selection) -
seems that it achieves the the same goal.

I think copy format can be pretty unclean when the line will be longer with multiline values or with a lot of values.  When the length of the line will be longer than the terminal width, then searching the wanted column can be pretty difficult.

When you know, so any value is on separate line or lines, then selection is just primitive, and there is good enough information to find wanted data quickly.

For this case I am working with hypothetical longer records with possible multiline fields - just something that does chaos on the terminal, and you want to select some part of data by mouse from the terminal screen.

Regards

Pavel





Best regards,
Platon Pronko

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

Предыдущее
От: Platon Pronko
Дата:
Сообщение: Re: very long record lines in expanded psql output
Следующее
От: Andres Freund
Дата:
Сообщение: Re: straightening out backend process startup