Created
August 1, 2015 14:03
-
-
Save roberto-filho/790dab1a1866c64dc2bc to your computer and use it in GitHub Desktop.
Descobrir as tabelas sem registros
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT relname | |
FROM pg_catalog.pg_class | |
WHERE relpages = 0 | |
AND NOT relisshared | |
AND NOT relhassubclass | |
AND relkind = 'r' | |
AND relnamespace <> (SELECT oid FROM pg_namespace WHERE nspname = 'pg_catalog'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment