Search Postgresql Archives

Re: How to determine which tables are created from inheritance.

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

 



I have answered my own question.

After some poking around I was able to find what I was looking for. I have posted for future reference.

select relname,relid  from pg_stat_user_tables where relid in (select inhrelid from pg_inherits) and relname like 'table%' order by relname;

Thanks,

Chris


From: compuguruchrisbarnes@xxxxxxxxxxx
To: pgsql-general@xxxxxxxxxxxxxx
Subject: How to determine which tables are created from inheritance.
Date: Fri, 13 Aug 2010 09:16:01 -0400


I am using londiste and would like to add tables for partitioned tables only. I.E. exclude the parent.

I am currently using the select below.
What postgres catalog table would I query to see this information?

psql database -t -c "select schemaname||'.'||relname from pg_stat_user_tables where relname like 'tablename%'"|xargs londiste.py londiste.ini provider add

 
Thanks,

Chris


[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