Add relation fork support to pg_relation_size() function. You can now pass
authorHeikki Linnakangas <heikki@enterprisedb.com>
Fri, 3 Oct 2008 07:33:10 +0000 (07:33 +0000)
committerHeikki Linnakangas <heikki@enterprisedb.com>
Fri, 3 Oct 2008 07:33:10 +0000 (07:33 +0000)
commit87bef7080e4da727cb2fe8adb5cecdadc40af19f
tree220bad976586b367525f7d71e6243d645fef651d
parent265d2bcc42a193f4199643a32d73f97d11466509
Add relation fork support to pg_relation_size() function. You can now pass
name of a fork ('main' or 'fsm', at the moment) to pg_relation_size() to
get the size of a specific fork. Defaults to 'main', if none given.

While we're at it, modify pg_relation_size to take a regclass as argument,
instead of separate variants taking oid and name. This change is
transparent to typical use where the table name is passed as a string
literal, like pg_relation_size('table'), but will break queries like
pg_relation_size(namecol), where namecol is of type name. text-type input
still works, and using a non-schema-qualified table name is not very
reliable anyway, so this is unlikely to break anyone's queries in practice.
doc/src/sgml/func.sgml
src/backend/utils/adt/dbsize.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/storage/relfilenode.h
src/include/utils/builtins.h