pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Format in psql
4+ messages / 3 participants
[nested] [flat]

* Format in psql
@ 2003-02-03 10:54 Bhuvan A <bhuvansql@myrealbox.com>
  2003-02-03 10:46 ` Re: Format in psql Tomasz Myrta <jasiek@klaster.net>
  2003-02-03 10:50 ` Re: Format in psql Ian Barwick <barwick@gmx.net>
  0 siblings, 2 replies; 4+ messages in thread

From: Bhuvan A @ 2003-02-03 10:54 UTC (permalink / raw)
  To: pgsql-sql

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                               |
+--------------+--------------------------------------------------------+

If yes, how can i do this? I have gone through the manual page of psql but
such formatting information donot appear over there. So, hope to get some
details over here. A link would be enough.

regards, 
bhuvaneswaran




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Format in psql
  2003-02-03 10:54 Format in psql Bhuvan A <bhuvansql@myrealbox.com>
@ 2003-02-03 10:46 ` Tomasz Myrta <jasiek@klaster.net>
  2003-02-04 05:26   ` Re: Format in psql Bhuvan A <bhuvansql@myrealbox.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Tomasz Myrta @ 2003-02-03 10:46 UTC (permalink / raw)
  To: Bhuvan A <bhuvansql@myrealbox.com>; +Cc: pgsql-sql

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                               |
> +--------------+--------------------------------------------------------+
> 
> If yes, how can i do this? I have gone through the manual page of psql but
> such formatting information donot appear over there. So, hope to get some
> details over here. A link would be enough.
> 
man psql.

Inside psql:
\pset border 2

Regards,
Tomasz Myrta





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Format in psql
  2003-02-03 10:54 Format in psql Bhuvan A <bhuvansql@myrealbox.com>
  2003-02-03 10:46 ` Re: Format in psql Tomasz Myrta <jasiek@klaster.net>
@ 2003-02-04 05:26   ` Bhuvan A <bhuvansql@myrealbox.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Bhuvan A @ 2003-02-04 05:26 UTC (permalink / raw)
  To: pgsql-sql


> man psql.
> 
> Inside psql:
> \pset border 2
> 

Fine, \pset border 2 draws the border. But it donot format the multi line
value, without affecting the format of other column. I want to format the
multi line column appropriately. It should not affect the format of other
column, similar to perl format ($ man perlform). Hope i am clear.

regards,
bhuvaneswaran






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Format in psql
  2003-02-03 10:54 Format in psql Bhuvan A <bhuvansql@myrealbox.com>
@ 2003-02-03 10:50 ` Ian Barwick <barwick@gmx.net>
  1 sibling, 0 replies; 4+ messages in thread

From: Ian Barwick @ 2003-02-03 10:50 UTC (permalink / raw)
  To: Bhuvan A <bhuvansql@myrealbox.com>; 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@gmx.net

 




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2003-02-04 05:26 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-03 10:54 Format in psql Bhuvan A <bhuvansql@myrealbox.com>
2003-02-03 10:46 ` Tomasz Myrta <jasiek@klaster.net>
2003-02-04 05:26   ` Bhuvan A <bhuvansql@myrealbox.com>
2003-02-03 10:50 ` Ian Barwick <barwick@gmx.net>

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