This is a discussion on pg_stat_user_tables within the Pgsql General forums, part of the PostgreSQL category; --> I'm selecting tables from my db using query: SELECT pg_stat_user_tables.relname FROM pg_stat_user_tables WHERE (pg_stat_user_tables.relname LIKE 'name_hosp_%') The problem I ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I'm selecting tables from my db using query: SELECT pg_stat_user_tables.relname FROM pg_stat_user_tables WHERE (pg_stat_user_tables.relname LIKE 'name_hosp_%') The problem I have is that the table names returned by this query are different from the ones in my db. Not all of them but 10%-20%. The common problem I noticed is adding "_" at the end of table name and truncating name "hospital" to "hosp". Anyone ever had similar problem? Any other way to get list of table names? Thanks, JP |
| ||||
| JackpipE <pipe.jack@gmail.com> writes: > I'm selecting tables from my db using query: > SELECT > pg_stat_user_tables.relname > FROM > pg_stat_user_tables > WHERE > (pg_stat_user_tables.relname LIKE 'name_hosp_%') > The problem I have is that the table names returned by this query are > different from the ones in my db. That hardly seems likely, since the contents of that view are drawn directly from pg_class. Maybe you have some old schemas you've forgotten about? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general |