Re: [HACKERS] psql Week 3 - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] psql Week 3
Date
Msg-id 199910192310.TAA17036@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] psql Week 3  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-hackers
>   >Very cool.  Nice new formats.  Man, I will have to add them to this
>   >book.  I am going to have to have pre-7.0 psql backslash command
>   >listings, and 7.0 backslash listings.  This improvement is long overdue.
>   >psql has always been one of our nifty features.  It just got niftier.
>  
> My previous database experience was with PICK, where the data dictionaries
> include an output format and the command language allows for column
> formatting 'on the fly'.  This is something that I have missed with
> PostgreSQL, though I believe the SQL standard does not cover it.

I had that with Progress.  Yes, it was handy.

> 
> What I would like would be the ability to attach a format to a column, so
> that text could be truncated at 25 characters or floats lined up with a

char(25)?

> specified number of decimal places.  (May be we can already and I've missed

numeric(16,2)?

> it?)  I would particularly like to be able to do text wrapping within a 
> column and totalling of numeric columns:


> 
> -----+---------------------+--------
> id   | description         |     qty
> -----+---------------------+--------
> abc1 | text that rambles   |   35.43
>      | on and on about     |
>      | something or other  |
> def2 | more useless text   |    2.00
> hgf3 | and yet more text   |  355.10
>      | to read             |
> -----+---------------------+--------
>      |                     |  392.53
> -----+---------------------+--------
> (3 rows)
> 
> Do you think there's any place for this in PostgreSQL?  Perhaps it needs a
> separate front-end tool.

That's a job for pgaccess.  I thought it did stuff like that.  If you
want printing like that, we need a report-writer, which is an important
application.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: "Aaron J. Seigo"
Date:
Subject: Re: [HACKERS] psql Week 3
Next
From: Bruce Momjian
Date:
Subject: book