# select oid from pg_database where datname='mybase';
oid
-------
17239
(1 row)
$ du -hs data/base/17239
13.5 M
For getting a table size to get an approx size you can do the following:
SELECT relpages * 8192 AS size_in_bytes
FROM pg_class
WHERE
relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = '<schema name>') AND
relname = '<table name>';
/Shoaib
On 3/27/06, Bruno Baguette <
pgsql-ml@xxxxxxxxxxxx> wrote:
Hello,
I works on a PostgreSQL 8.0.4 database, and I would like to known the
size (in bytes, Mbytes or anything else) of that database, for each table.
How can I do that ?
Thanks in advance !
--
Bruno BAGUETTE
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings