Re: very long record lines in expanded psql output - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: very long record lines in expanded psql output
Date
Msg-id CAFj8pRB+fu_GfZmw4WpO-qp+K4UnHE0q2NSkkvs=oxBndgNurA@mail.gmail.com
Whole thread Raw
In response to Re: very long record lines in expanded psql output  (Platon Pronko <platon7pronko@gmail.com>)
Responses Re: very long record lines in expanded psql output  (Platon Pronko <platon7pronko@gmail.com>)
List pgsql-hackers


čt 5. 8. 2021 v 20:30 odesílatel Platon Pronko <platon7pronko@gmail.com> napsal:
Hi!

>>>>> I also find this annoying and would be happy to be rid of it.
>>>>
>>>> Have you tried "\pset format wrapped"? Pavel suggested it, and it
>>>> solved most of the problem for me, for example.
>>>
>>> Yes, but it changes the data line output. Ideally, you should be able
>>> to  modify these independently.
>>
>> I agree, and I think this can be implemented, but I'm a bit afraid of
>> introducing an additional psql option (there's already quite a lot of
>> them).
>> I suspect primary PostgreSQL maintainers won't be happy with such an
>> approach.
>>
>
> it can be a fully new format - designed for simple copy from terminal. Some
> like
>
> ====== record: 10 ======
> ------------ proname ------------
> left
> ------------ prosrc  ------------
> $lalalal
> ewqrwqerw
> ewqrwqerqrewq
> $
> ===============

I don't think that would be a good idea. If somebody really just needs to copy,
then wrapping the query in "copy (...) to stdout" already works nicely,
no need to create a special mode just for that.

It is working well, but it is copy to file, not copy to clipboard.

I think the question was more about being able to copy in an ad-hoc way,
in the middle of scrolling trough "normal" output.

I understand your motivation, but I don't feel a significant benefit to increase the complexity of the main format (more, when it breaks pspg, without possibility to fix it). but it can depend on usual data, and it is true, so when I use pspg, I don't use extended mode too often.


Best regards,
Platon Pronko

pgsql-hackers by date:

Previous
From: Platon Pronko
Date:
Subject: Re: very long record lines in expanded psql output
Next
From: Platon Pronko
Date:
Subject: Re: very long record lines in expanded psql output