From: | Frank Heikens <frankheikens(at)mac(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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:26:09 |
Message-ID: | 830EE9E4-71BA-463C-84AA-19D0E901E275@mac.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Agreed.
Personally I wouldn't use pg_tables at all because of the missing oid.
Would be nice to have in this view, but it can't be changed because
it's a system-view. pg_class would do the job.
Regards,
Frank
Op 16 jun 2009, om 16:12 heeft Tom Lane het volgende geschreven:
> 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 :-(
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Broersma | 2009-06-16 14:51:24 | Re: Custom Fields Database Architecture |
Previous Message | Tom Lane | 2009-06-16 14:12:25 | Re: pg_relation_size, relation does not exist |