postgresql - Alternate output format for psql -


i using postgresql 8.4 on ubuntu. have table columns c1 through cn. columns wide enough selecting columns causes row of query results wrap multiple times. consequently, output hard read.

when query results constitute few rows, convenient if view query results such each column of each row on separate line, e.g.

 c1: <value of row 1's c1>  c2: <value of row 1's c1>  ...  cn: <value of row 1's cn>  ---- kind of delimiter ----  c1: <value of row 2's c1>  etc. 

i running these queries on server prefer not install additional software. there psql setting let me that?

i needed spend more time staring @ documentation. command:

\x on 

will wanted. here sample output:

select * dda u_id=24 , dda_is_deleted='f'; -[ record 1 ]------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- dda_id             | 1121 u_id               | 24 ab_id              | 10304 dda_type           | checking dda_status         | pending_verification dda_is_deleted     | f dda_verify_op_id   | 44938 version            | 2 created            | 2012-03-06 21:37:50.585845 modified           | 2012-03-06 21:37:50.593425 c_id               |  dda_nickname       |  dda_account_name   |  cu_id              | 1 abd_id             |  

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -