Platon Pronko wrote: > Maybe we can avoid making the header line longer than terminal width > for \pset border 0 and \pset border 1? We already have terminal > width calculated. Please see attached a patch with the proposed > implementation.
+1 for doing something against these long lines. Rather than padding up to the terminal's width, we could simply end the line after the "-[RECORD N]-" marker, with the idea that the rest of it does not add much to readability anyway. And when writing into a file as opposed to a terminal, getting rid of these lines is useful too. In that case, your example could be displayed like this: => \pset expanded on => \pset border 1 => select n, repeat('x', n) as long_column_name from unnest(array[42,210]) as n; -[ RECORD 1 ]- n | 42 long_column_name | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -[ RECORD 2 ]- n | 210 long_column_name | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx => \pset border 0 => select n, repeat('x', n) as long_column_name from unnest(array[42,210]) as n; * Record 1 n 42 long_column_name xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx * Record 2 n 210 long_column_name xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Best regards, -- Daniel Vérité PostgreSQL-powered mailer: https://www.manitou-mail.org Twitter: @DanielVerite