parsed.org

Tips by tag: output

Cleaner Output by xinu on Jan 15, 2005 06:03 PM

Tired of those wide tables that wrap? You can end your query with a \G to get output like this:

mysql> select * from users\G
*************************** 1. row ***************************
     id: 1
   name: xinu
created: 20050115210745
*************************** 2. row ***************************
     id: 2
   name: cygnus
created: 20050115210803
2 rows in set (0.00 sec)
configurationconvertmysqloutputsql
MySQL-style output border by cygnus on Jan 12, 2005 10:25 AM

In your ~/.psqlrc, add this to emulate MySQL-style borders in query results:

\pset border 2
commandsconfigurationmysqloutputpostgresqlpsqlpsqlrc
Query Timing by xinu on Jan 19, 2005 09:43 AM

If you want to see how long a query is taking to run, you can either run explain analyze or enable timing for the client by typing \timing.

analysisconfigurationdebuggingdurationoutputperformancepostgresqlpsqlruntimesqltiming
RSS