Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



AI Rumman <rummandba@xxxxxxxxx> 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux