Re: pg_relation_size, relation does not exist

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frank Heikens <frankheikens(at)mac(dot)com>
Cc: Whit Armstrong <armstrong(dot)whit(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_relation_size, relation does not exist
Date: 2009-06-16 14:12:25
Message-ID: 13767.1245161545@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frank Heikens <frankheikens(at)mac(dot)com> writes:
> pg_size_pretty(pg_relation_size(schemaname || '.' || tablename))

At some point you're going to wish you'd used quote_ident() here.

regards, tom lane

PS: Personally I prefer to rely on pg_relation_size(oid), but to use
that you need to be looking directly at pg_class, not at pg_tables
which doesn't expose the oid column :-(

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Frank Heikens 2009-06-16 14:26:09 Re: pg_relation_size, relation does not exist
Previous Message Tom Lane 2009-06-16 14:06:54 Re: Playing with set returning functions in SELECT list - behaviour intended?