pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ian Barwick <barwick@gmx.net>
To: Bhuvan A <bhuvansql@myrealbox.com>
To: pgsql-sql@postgresql.org
Subject: Re: Format in psql
Date: Mon, 3 Feb 2003 11:50:28 +0100
Message-ID: <200302031150.28945.barwick@gmx.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0302031619080.11108-100000@Bhuvan.bksys.co.in>
References: <Pine.LNX.4.44.0302031619080.11108-100000@Bhuvan.bksys.co.in>

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@gmx.net

 




view thread (4+ messages)  latest in thread

Message-ID: <200302031150.28945.barwick@gmx.net>
Permalink:  ../200302031150.28945.barwick@gmx.net/
Also on:    postgresql.org/message-id/200302031150.28945.barwick@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: barwick@gmx.net, bhuvansql@myrealbox.com
  Subject: Re: Format in psql
  In-Reply-To: <200302031150.28945.barwick@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox