Re: Retrieving database schema
От | Tom Lane |
---|---|
Тема | Re: Retrieving database schema |
Дата | |
Msg-id | 26200.1048394381@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Retrieving database schema (Lamar Owen <lamar.owen@wgcr.org>) |
Список | pgsql-general |
Lamar Owen <lamar.owen@wgcr.org> writes: > I use the following, although it uses pre-7.0 semantics and may or may not > work with 7.3 > SELECT relname > FROM pg_class > WHERE relkind = 'r' and relname !~ '^Inv' > and relname !~ '^pg_' > ORDER BY relname > I don't remember the reason for the ^Inv regex. I believe that's a hangover from back when each large object was its own relation. [digs in archives...] OK, that's dead code since 7.1, and it was wrong before that ... the special relation names were xin* ... In 7.3, suppressing relnames starting with 'pg_' isn't really quite the kosher way to hide system tables, either. It works but it might suppress legitimate user tables --- there's not a prohibition against user tables named 'pg_*' anymore. The best way moving forward will be to ignore tables that are in system schemas. regards, tom lane
В списке pgsql-general по дате отправления: