From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Christoph Berg <myon(at)debian(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, 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: | Re: \pset xheader_width page as default? (Re: very long record lines in expanded psql output) |
Date: | 2022-08-30 14:28:05 |
Message-ID: | CAFj8pRCjmO1dogaDGQzkY6YtFLU+Q0LNcu=7q3-+1w25O3+Jnw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
út 30. 8. 2022 v 15:49 odesílatel Christoph Berg <myon(at)debian(dot)org> napsal:
> 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.
>
pspg requires all lines to have the same width. It can do some corrections
- but it is hard to detect wanted differences or just plain text format.
can be nice to have the first invisible row with some information about
used formatting. pspg does some heuristic but this code is not nice and it
is fragile.
Regards
Pavel
> Can we set 'page' as default?
>
> Christoph
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-08-30 14:28:52 | Re: Convert *GetDatum() and DatumGet*() macros to inline functions |
Previous Message | Robert Haas | 2022-08-30 14:27:48 | Re: Convert *GetDatum() and DatumGet*() macros to inline functions |