To get formatted results for select statements use \G as a suffix for the query. select * from table_name \G;