Thursday, June 26, 2008

Show Tables equivalent in Postgresql

The equivalent of mysql 'show tables' command in postgresql:

\dt



To see more information about the table, do \dt with the table name:

\dt table_name



If you want to see more than just tables (eg. sequences), use:

\d



To see all databases, like 'show databases' in mysql:

select datname from pg_database;

0 comments:

Post a Comment