Skip site navigation (1) Skip section navigation (2)

Quick ? - terminal display for "select" results

From: Ben Riddell <ben(at)thewhitebear(dot)com>
To: sfpug(at)postgresql(dot)org
Subject: Quick ? - terminal display for "select" results
Date: 2005-03-08 18:36:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: sfpug

Still finding my way around PostgreSQL (and command line interfaces in 
general), and had a quick question.

MySQL has an optional command ending of \G that returns results vertically 
formatted -

mysql> select * from users limit 2 \G
*************************** 1. row ***************************
     name: [xxx]
  contact: [xxx]
    login: [xxx]
password: [xxx]
  user_id: 1
*************************** 2. row ***************************
     name: [xxx]
  contact: [xxx]
    login: [xxx]
password: [xxx]
  user_id: 2

Don't wanna spend much time with the fancy-pants formatting (that's what my 
web interface is for). I just need the occasional quick set of results from 
the command line.

Does pgsql have a parallel option?


-Ben Riddell

--------- Ben Riddell ---------
--- Freelance Web Developer ---
- ben at thewhitebear dot com -
----- ----
------- 510/332.2979 (c) ------

As nightfall does not come at once, neither does oppression. In both
instances there is a twilight when everything remains seemingly unchanged.
And it is in such twilight that we all must be most aware of change in the
air - however slight - lest we become unwitting victims of the darkness.
-William O. Douglas, judge (1898-1980)


sfpug by date

Next:From: Fred MoyerDate: 2005-03-08 19:15:59
Subject: Re: Meeting this Wed, Full Info
Previous:From: Fred MoyerDate: 2005-03-08 18:31:35
Subject: Re: Problems with MT, SFPUG web

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group