Error in getting top 10 biggest table

From: Ankur Kaushik <ankurkaushik(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Error in getting top 10 biggest table
Date: 2015-07-25 07:03:06
Message-ID: CALXoLqz5JOMpAx34w+6QGUPx1th70-xDzpEnjEDuJWb5L09SfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi ,

I am executing below query to get top 10 biggest size table but getting
error

SELECT table_name,pg_relation_size(table_schema || '.' || table_name) as
size FROM information_schema.tables WHERE table_schema NOT IN
('information_schema', 'pg_catalog') ORDER BY size DESC LIMIT 10;

*ERROR: relation "public.contacts" does not exist*

*Original Table : Contacts*

It seems problem is with CAPS letter in Postgres table .

So any possibilities to execute this Caps letter table without any error

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2015-07-25 08:16:26 Re: Reg:Autocommit
Previous Message Shreeyansh Dba 2015-07-25 06:10:33 Re: Reg:Autocommit