There were no support for wrapping and old-ascii line style in expanded mode at all. But now they are.
2014-04-11 21:58 GMT+04:00 Alvaro Herrera <alvhe...@2ndquadrant.com>: > Sergey Muraviov wrote: > > I hope that I realized old-ascii logic correctly. > > I don't know what you changed here, but I don't think we need to > preserve old-ascii behavior in the new code, in any way. If you're > mimicking something obsolete and the end result of the new feature is > not great, perhaps that should be rethought. > > Can you please provide sample output for the previous version compared > to this new version? What changed? > > > -- > Álvaro Herrera http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services > -- Best regards, Sergey Muraviov
\pset expanded on \pset border 2 \pset columns 20 \pset format wrapped \pset linestyle unicode postgres=# select array_to_string(array_agg(repeat('x',n)),E'\n') as "x postgres"# y", array_to_string(array_agg(repeat('yy',10-n)),E'\n') as "x postgres"# y postgres"# z" from (select generate_series(1,10)) as t(n); ┌─[ RECORD 1 ]─────┐ │ x↵│ x ↵│ │ y │ xx ↵│ │ │ xxx ↵│ │ │ xxxx ↵│ │ │ xxxxx ↵│ │ │ xxxxxx ↵│ │ │ xxxxxxx ↵│ │ │ xxxxxxxx ↵│ │ │ xxxxxxxxx ↵│ │ │ xxxxxxxxxx │ │ x↵│ yyyyyyyyyyyy…│ │ y↵│…yyyyyy ↵│ │ z │ yyyyyyyyyyyy…│ │ │…yyyy ↵│ │ │ yyyyyyyyyyyy…│ │ │…yy ↵│ │ │ yyyyyyyyyyyy↵│ │ │ yyyyyyyyyy ↵│ │ │ yyyyyyyy ↵│ │ │ yyyyyy ↵│ │ │ yyyy ↵│ │ │ yy ↵│ │ │ │ └───┴──────────────┘ postgres=# \pset linestyle ascii Line style (linestyle) is ascii. postgres=# select array_to_string(array_agg(repeat('x',n)),E'\n') as "x y", array_to_string(array_agg(repeat('yy',10-n)),E'\n') as "x y z" from (select generate_series(1,10)) as t(n); +-[ RECORD 1 ]-----+ | x+| x +| | y | xx +| | | xxx +| | | xxxx +| | | xxxxx +| | | xxxxxx +| | | xxxxxxx +| | | xxxxxxxx +| | | xxxxxxxxx +| | | xxxxxxxxxx | | x+| yyyyyyyyyyyy.| | y+|.yyyyyy +| | z | yyyyyyyyyyyy.| | |.yyyy +| | | yyyyyyyyyyyy.| | |.yy +| | | yyyyyyyyyyyy+| | | yyyyyyyyyy +| | | yyyyyyyy +| | | yyyyyy +| | | yyyy +| | | yy +| | | | +---+--------------+ postgres=# \pset linestyle old-ascii Line style (linestyle) is old-ascii. postgres=# select array_to_string(array_agg(repeat('x',n)),E'\n') as "x y", array_to_string(array_agg(repeat('yy',10-n)),E'\n') as "x y z" from (select generate_series(1,10)) as t(n); +-[ RECORD 1 ]-----+ | x | x | |+y : xx | | : xxx | | : xxxx | | : xxxxx | | : xxxxxx | | : xxxxxxx | | : xxxxxxxx | | : xxxxxxxxx | | : xxxxxxxxxx | | x | yyyyyyyyyyyy | |+y ; yyyyyy | |+z : yyyyyyyyyyyy | | ; yyyy | | : yyyyyyyyyyyy | | ; yy | | : yyyyyyyyyyyy | | : yyyyyyyyyy | | : yyyyyyyy | | : yyyyyy | | : yyyy | | : yy | | : | +---+--------------+
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers