Quantcast
Channel: Planet PostgreSQL
Viewing all articles
Browse latest Browse all 9658

Pavel Stehule: Simple multicolumn ouput in psql

$
0
0
There are interesting idea on Depesz's blog .

But some possibility has a Linux itself. There is simple pager column.

You can try (blogger engine break formatting):
postgres=# \pset tuples_only
postgres=# \setenv PAGER column

postgres=# select typname from pg_type limit 100;
bool pg_type line _bool _varchar _inet _numeric
bytea pg_attribute _line _bytea _int8 _cidr timetz
char pg_proc float4 _char _point _cstring _timetz
name pg_class float8 _name _lseg bpchar bit
int8 json abstime _int2 _path varchar _bit
int2 xml reltime _int2vector _box date varbit
int2vector _xml tinterval _int4 _float4 time _varbit
int4 _json unknown _regproc _float8 timestamp numeric
regproc pg_node_tree circle _text _abstime _timestamp refcursor
text smgr _circle _oid _reltime _date _refcursor
oid point money _tid _tinterval _time
tid lseg _money _xid _polygon timestamptz
xid path macaddr _cid aclitem _timestamptz
cid box inet _oidvector _aclitem interval
oidvector polygon cidr _bpchar _macaddr _interval

postgres=#
It works together with less
postgres=# \setenv PAGER '(column | less)'
postgres=# select typname from pg_type;
...

Do you know some other nice pagers?

Viewing all articles
Browse latest Browse all 9658

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>