PostgreSQL query to list all table names?

Is there any query available to list all tables in my Postgres DB.

I tried out one query like:

SELECT table_name FROM information_schema.tables
                      WHERE table_schema="public" 

But this query returns views also.

How can i get only table names only, not views?

7 Answers
7

Leave a Comment