Re: How to view the list of tables?
От | Mihail Nasedkin |
---|---|
Тема | Re: How to view the list of tables? |
Дата | |
Msg-id | 15115500796.20050215161551@mail.ru обсуждение исходный текст |
Ответ на | How to view the list of tables? (Konstantin Danilov <danilov_konst@list.ru>) |
Список | pgsql-sql |
Hello, Konstantin. You wrote February, 15 2005 г., 15:16:57: KD> I need to view the list of tables in a database. In MySQL I KD> can do it with the command "SHOW TABLES". What about PostgreSQL? All tables: select ... from pg_catalog.pg_class where c.relkind='r'; All tables of the public schema: select ... from pg_catalog.pg_class c join pg_catalog.pg_namespace n on c.relnamespace=n.oid where c.relkind='r' and n.nspname='public'; KD> Can I also see somehow the datatypes of tables' fields? select ... from pg_catalog.pg_class c join pg_catalog.pg_attribute a on c.oid=a.attrelid join pg_catalog.pg_type t on a.atttypid=t.oid See also: \d pg_class \d pg_namespace \d pg_attribute \d pg_type -- rgds,Mihail mailto:m.nasedkin.perm@mail.ru
В списке pgsql-sql по дате отправления: