Re: [HACKERS] psql Week 3

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] psql Week 3
Date: 1999-10-19 22:52:04
Message-ID: 199910192252.XAA23345@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
>> For external reasons I didn't get as much done as I wanted. Originally, I
>> planned for 4 weeks and I think I can keep that.
>>
>> The source is posted at http://www.pathwaynet.com/~peter/psql3.tar.gz
>>
>> CHANGELOG
>> * Accommodated object descriptions in \d* commands.
>> * Re-wrote \dd
>> * Re-wrote \d "table"
>> * \pset command as generic way for setting printing options (e.g.,
>> \pset format html, \pset null "(null)")
>> * Proliferated use of const char * and enums
>> * Rewrote \di, \dt, \ds, \dS. Say hello to \dv for views, which are
>> now recognized correctly. You can also call, e.g., \dtvi for a list
>> of indices, tables, and views. The possibilities are endless ...
>> (where "endless" = 325)
>>
>
>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.

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
specified number of decimal places. (May be we can already and I've missed
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.

--
Vote against SPAM: http://www.politik-digital.de/spam/
========================================
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"Commit thy way unto the LORD; trust also in him and
he shall bring it to pass." Psalms 37:5

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Carsten Huettl 1999-10-19 23:01:24 Re: [GENERAL] ld.so failed
Previous Message Bruce Momjian 1999-10-19 22:20:52 book status