How to view the list of tables?

Поиск
Список
Период
Сортировка
Искать

How to view the list of tables?

От:
Konstantin Danilov <danilov_konst@list.ru>
Дата:

Hello, list!
I need to view the list of tables in a database. In MySQL I can do it with the command "SHOW TABLES". What about PostgreSQL?
Can I also see somehow the datatypes of tables' fields?
Konstantin

Re: How to view the list of tables?

От:
Richard Huxton <dev@archonet.com>
Дата:
Konstantin Danilov wrote:
> Hello, list!
> I need to view the list of tables in a database. In MySQL I can do it with the command "SHOW TABLES". What about PostgreSQL?
> Can I also see somehow the datatypes of tables' fields?
> Konstantin

"man psql" will show you details of how to operate the psql application, 
or when in it try "\?" and "\h" to get help. We also now support the 
SQL-standard "information schema".

You'll also find the manuals have this information - available with your 
installation and also online at http://www.postgresql.org/docs/

HTH
-- 
   Richard Huxton
   Archonet Ltd

Re: How to view the list of tables?

От:
Shridhar Daithankar <ghodechhap@ghodechhap.net>
Дата:
On Tuesday 15 Feb 2005 3:46 pm, Konstantin Danilov wrote:
> Hello, list!
> I need to view the list of tables in a database. In MySQL I can do it with
> the command "SHOW TABLES". What about PostgreSQL? Can I also see somehow
> the datatypes of tables' fields?

In psql, you can try '\dt' and '\d table name'. Type \? for more commands..

 Shridhar
FAQ