Re: Format in psql

From: Ian Barwick <barwick(at)gmx(dot)net>
To: Bhuvan A <bhuvansql(at)myrealbox(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Format in psql
Date: 2003-02-03 10:50:28
Message-ID: 200302031150.28945.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Monday 03 February 2003 11:54, Bhuvan A wrote:
> Hi,
>
> I am using pgsql-7.2.3. Can i able to format the output of a SELECT sql in
> psql as perl format?
>
> Something like,
> +--------------+--------------------------------------------------------+
> | work_desc_id | short_desc |
> +--------------+--------------------------------------------------------+
> | 1 | Short description line 1 |
> |
> | | Short description line 2 |
> | | Short description line 3 |
> | | Short description line n |
> +--------------+--------------------------------------------------------+

'fraid I don't understand what you mean by "perl" format.

You can get format in the style above by executing
\pset border 2
in psql.

(SQL*Plus fans should issue
\pset border 0
and recompile psql without readline support to simulate
an Oracle environment ;-)

Place this setting in your .psqlrc file to make it permanent.

Ian Barwick
barwick(at)gmx(dot)net

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bhuvan A 2003-02-03 10:54:32 Format in psql
Previous Message Tomasz Myrta 2003-02-03 10:46:25 Re: Format in psql