Catalog of PostgreSQL queries for finding information about a PostgreSQL database and its design problems
All the queries about database objects contain a subcondition to exclude from the result information about the system catalog.
Although the statements use SQL constructs (common table expressions; NOT in subqueries) that could cause performance problems in case of large datasets it shouldn't be a problem
in case of relatively small amount of data, which is in the system catalog of a database.