Re: [HACKERS] psql Week 3
От | Peter Eisentraut |
---|---|
Тема | Re: [HACKERS] psql Week 3 |
Дата | |
Msg-id | Pine.GSO.3.96.991020120338.28782A-100000@cronstedt.csd.uu.se обсуждение исходный текст |
Ответ на | Re: [HACKERS] psql Week 3 ("Oliver Elphick" <olly@lfix.co.uk>) |
Список | pgsql-hackers |
On Tue, 19 Oct 1999, Oliver Elphick wrote: > 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. Hmm. Well, the idea of keeping formatting data in the backend doesn't sound too exciting to me. The data type already contains a fair amount of formatting information in itself. But psql is not supposed to be a report generator. It's also not a typesetting engine. The idea was to sort of write a shell, but one that doesn't use the OS kernel but a database server. > > 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 Okay, lining up floats is sort of on the wish list (as distinct from todo list). I'll keep that in mind. > it?) I would particularly like to be able to do text wrapping within a > column and totalling of numeric columns: Wrapping text also seemed like a nice idea to me, but psql is supposed to be a query interpreter. Wrapping text is a whole different animal and there are specialty programs out there for that. And totalling numeric columns is the job of a report generator. All psql does is send a query and output the results, and it wants to make that job as fun as possible along the way. It doesn't know anything about what's in the query results. That is probably an important line to keep. > > -----+---------------------+-------- > 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. I hear pg_access has a report generator. If you want a text-based report generator, then you're seemingly on your own. -Peter -- Peter Eisentraut Sernanders vaeg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
В списке pgsql-hackers по дате отправления: