On Monday 23. June 2008, salman wrote:
>This is what I use: SELECT
>pg_size_pretty(pg_database_size(current_database()));
Great, I remember that I saw it, but couldn't remember the command. Now
I've made a function:
CREATE OR REPLACE FUNCTION db_size() RETURNS TEXT AS $$
SELECT pg_size_pretty(pg_database_size(current_database()));
$$ LANGUAGE sql STABLE;
pgslekt=> select db_size();
db_size
---------
63 MB
(1 row)
--
Leif Biberg Kristensen | Registered Linux User #338009
http://solumslekt.org/ | Cruising with Gentoo/KDE
My Jazz Jukebox: http://www.last.fm/user/leifbk/