pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Platon Pronko <platon7pronko@gmail.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: very long record lines in expanded psql output
Date: Mon, 23 Aug 2021 20:51:24 +0300
Message-ID: <aae2bfe7-e07f-bb11-5d5a-529e76e0f317@gmail.com> (raw)
In-Reply-To: <92258bb8-8b9d-8f70-6f34-b5499215204c@dunslane.net>
References: <f03d38a3-db96-a56e-d1bc-dbbc80bbde4d@gmail.com>
	<CAFj8pRBJ8bcTga9qTYG_v25BfeCB=4+GNc1rbf94qex_3C_e-A@mail.gmail.com>
	<998a8549-f808-a349-bae6-9f44d07e050d@dunslane.net>
	<d5280c71-b11b-b0fc-f57d-5033a9197406@gmail.com>
	<bf64d7b0-413d-1501-00b2-992491b865b0@dunslane.net>
	<4e8b9a10-95aa-aecf-01a1-cbc24d643465@gmail.com>
	<66d23848-9f73-abc9-2fbb-3b8abfbb2fce@dunslane.net>
	<0efd52b9-450a-7636-fb75-663bc2d81b34@gmail.com>
	<92258bb8-8b9d-8f70-6f34-b5499215204c@dunslane.net>

Hi!

Please find attached the patch implementing the proposed changes.
I hope I didn't forget anything (docs, tab completion, comments, etc),
if I did forget something please tell me and I'll fix it.

Best regards,
Platon Pronko

On 2021-08-08 01:18, Andrew Dunstan wrote:
> 
> On 8/7/21 10:56 AM, Platon Pronko wrote:
>> 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.
>>>>
>>>>
>>>
>>> I think I qualify as one of those ... :-)
>>
>> Sorry, I'm new here, don't know who's who :)
> 
> 
> No problem. Welcome! We're always very glad to see new contributors.
> 
> 
>>
>> I'll start working on a new patch then. A couple questions about
>> specifics:
>>
>> 1. Can we add "expanded" in the option name, like
>> "xheader_expanded_width"?
>> I think adjusting the header row width doesn't make sense on any other
>> modes,
>> and placing that in the option name makes intent a bit clearer.
> 
> 
> 
> "xheader" was meant to be shorthand for "expanded output header"
> 
> 
>>
>> 2. What was "column" option in your original suggestion supposed to do?
>> ("\pset xheader_width column|page|nnn")
> 
> 
> It's meant to say don't print anything past the column spec, e.g.:
> 
> 
> -[ RECORD 1 ]----+
> n                | 42
> long_column_name | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> -[ RECORD 2 ]----+
> n                | 210
> long_column_name | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> 
> 
>>
>> 3. Should we bother with using this option when in "\pset border 2" mode?
>> I can do it for consistency, but it will still look bad.
>>
>>
> 
> Probably not, but since I never use it I'll let others who do weigh in
> on the subject.
> 
> 
> cheers
> 
> 
> andrew
> 
> 
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com
> 





view thread (39+ messages)  latest in thread

Message-ID: <aae2bfe7-e07f-bb11-5d5a-529e76e0f317@gmail.com>
Permalink:  ../aae2bfe7-e07f-bb11-5d5a-529e76e0f317@gmail.com/
Also on:    postgresql.org/message-id/aae2bfe7-e07f-bb11-5d5a-529e76e0f317@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: platon7pronko@gmail.com, andrew@dunslane.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: very long record lines in expanded psql output
  In-Reply-To: <aae2bfe7-e07f-bb11-5d5a-529e76e0f317@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox