\pset xheader_width page as default? (Re: very long record lines in expanded psql output)

From: Christoph Berg <myon(at)debian(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Platon Pronko <platon7pronko(at)gmail(dot)com>, Zhihong Yu <zyu(at)yugabyte(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: \pset xheader_width page as default? (Re: very long record lines in expanded psql output)
Date: 2022-08-30 13:49:44
Message-ID: Yw4VeB4WOcpgR4k9@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: Andrew Dunstan
> >> +               pg_log_error("\\pset: allowed xheader_width values are full
> >> (default), column, page, or an number specifying exact width.");

> Committed. There were a couple of bits missing, which I filled in, and I
> changed the behaviour when the option is given without an argument, so
> that instead of resetting it the current value is shown, similarly to
> how most pset options work.

Thanks for implementing this! This has been #1 on my PG annoyances
list since forever. I had even tried to patch it 10½ years ago, but
ever managed to get that patch to submittable quality.

Now, is there a chance that we could make this the default? Having
psql print a whole screen of ------------ minus characters doesn't
seem very useful as default behavior.

I see upthread that Pavel was objecting to that because pspg doesn't
understand it. But since the expanded format is a one-column output,
and the only thing pspg needs to know is the maxium line length, I'd
think pspg could just look at each line, and update the maximum as it
reads the input anyway.

Can we set 'page' as default?

Christoph

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2022-08-30 13:59:45 Re: Convert *GetDatum() and DatumGet*() macros to inline functions
Previous Message Tom Lane 2022-08-30 13:46:35 Re: Convert *GetDatum() and DatumGet*() macros to inline functions