| From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
|---|---|
| To: | Andrus <kobruleht2(at)hot(dot)ee> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Returning schema name with table name |
| Date: | 2008-11-21 14:43:39 |
| Message-ID: | 162867790811210643v4ad96d8fkc56de92844fbb05f@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
2008/11/21 Andrus <kobruleht2(at)hot(dot)ee>:
> SELECT oid, relname::char(35) as Table_Name,
> pg_size_pretty(pg_total_relation_size(oid))::VARCHAR(15) as
> Total_Table_Size
> FROM pg_class
> where pg_total_relation_size(oid)/(1024*1024)>0
> ORDER BY pg_total_relation_size(oid) desc
>
add SELECT n.nspname
and
FROM pg_class
JOIN pg_catalog.pg_namespace n ON n.oid = pg_class.relnamespace
...
Regards
Pavel Stehule
> returns table names with size greater than 1 MB
>
> How to modify this so that schema name is also returned?
> I have lot of tables with same name and thus this output is difficult to
> understand.
> pg_class seems not contain schema names.
>
> Andrus.
>
>
> --
> 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 | Scara Maccai | 2008-11-21 14:48:44 | [Fwd: Re: return MAX and when it happened] |
| Previous Message | Sam Mason | 2008-11-21 14:33:47 | Re: Postgres mail list traffic over time |