Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Using the psql command line tool, how do I list all postgres tables in one particular schema

share|improve this question

migrated from Jul 23 '11 at 2:11

This question came from our site for system and network administrators.

2 Answers 2

up vote 8 down vote accepted

\dt schemaname.* will do what you want.

share|improve this answer

In addition to the \dt match, you can also look into the database catalog:

SELECT nspname||'.'||relname AS full_rel_name
  FROM pg_class, pg_namespace
 WHERE relnamespace = pg_namespace.oid
   AND nspname = 'yourschemaname'
   AND relkind = 'r';

You can also do it with the more standard information schema, but it tends to be slower:

SELECT table_schema||'.'||table_name AS full_rel_name
  FROM information_schema.tables
 WHERE table_schema = 'yourschemaname';
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.