tags:

views:

512

answers:

3

How do you say "show tables" (mysql) in Postgresql?

+10  A: 

From the psql CLI, enter the \dt command. Programmatically (or from the psql interface too, of course),

SELECT * FROM pg_catalog.pg_tables

(the system tables live in the pg_catalog database.)

Mihai Limbășan
A: 

Moocha's answer is correct. Alternatively, you can use the pgadmin3 gui admin tool, or pgphpadmin.

Dana the Sane
+5  A: 

(For completeness)

You could also query the (SQL-standard) information schema:

SELECT
    table_schema || '.' || table_name
FROM
    information_schema.tables
WHERE
    table_type = 'BASE TABLE'
AND
    table_schema NOT IN ('pg_catalog', 'information_schema');
Milen A. Radev