Re: Seems like bug in 9.1.3, need to confirm.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: AI Rumman <rummandba(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Seems like bug in 9.1.3, need to confirm.
Date: 2013-12-21 00:12:47
Message-ID: 25658.1387584767@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

AI Rumman <rummandba(at)gmail(dot)com> writes:
> I executed the following query and got an error:
> select relname, pg_size_pretty(pg_table_size(relname::text)) as s from
> pg_stat_user_tables order by pg_table_size(relname::text) desc limit 10;
> ERROR: relation "tab_20130206" does not exist

Use the OID, not the relname, else you'll have issues with any table
that's not in your search_path.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-12-21 00:14:23 Re: pg_upgrade & tablespaces
Previous Message Tom Lane 2013-12-21 00:08:53 Re: window function and order by