TODO item inquiry/claim
От | Brent Verner |
---|---|
Тема | TODO item inquiry/claim |
Дата | |
Msg-id | 20011118073604.A6800@rcfile.org обсуждение исходный текст |
Ответы |
Re: TODO item inquiry/claim
|
Список | pgsql-hackers |
Hi all, In looking over the TODO doc, I saw * Add table name mapping for numeric file names After reading the thread that bore that entry, I'd like to submit a bit of code for consideration, since it solves at least one of the problems raised in that thread. You may fetch it from cvs;sh$ cvs -d :pserver:anoncvs@rcfile.org:/var/cvs login [no password, just press enter]sh$ cvs -d :pserver:anoncvs@rcfile.org:/var/cvs co pg_stat_dush$ echo "read the README" It's been tested with 7.1 and 7.2bN and is basically a few c functions that allow (approximate) reports of disk usage (in Kb) per database, and per relation (only on the current database, for now). brent=# SELECT datname, pg_du_db(datname) AS diskusage FROM pg_database; datname | diskusage -----------+-----------brent | 1785template1 | 1713template0 | 1713 (3 rows) brent=# select relname,pg_du_rel(relname) as diskusage from pg_class brent-# where (relkind='r' or relkind='i') order by diskusage desc; relname | diskusage ---------------------------------+-----------pg_proc | 252pg_proc_proname_narg_type_index | 236pg_description | 100pg_attribute | 92pg_operator | 84 ... If you guys could suggest what needs to be added/modified to allow Bruce to mark off that TODO item, I can probably get that done later today. cheers. brent -- "Develop your talent, man, and leave the world something. Records are really gifts from people. To think that an artist would love you enough to share his music with anyone is a beautiful thing." -- Duane Allman
В списке pgsql-hackers по дате отправления: