Catalog of PostgreSQL queries for finding information about a PostgreSQL database and its design problems

AND
AND
ANDQueries of this catergory provide information about the database objects that are not used.
ANDFrom where does the query gets its information?
AND
AND

There are 20 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
1Columns with only one valueFind base table columns that contain only one value. Perhaps it is an unnecessary column. Having only one value is most likely inadequate for testing.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
2Declaratively partitioned tables without partitionsFind declaratively partitioned tables that do not have any partitions. Declarative partitioning is implemented in PostgreSQL starting from PostgreSQL 10.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
3Disabled rulesIdentify disabled rules. These should be enabled or dropped, otherwise these are dead code.Problem detectionsystem catalog base tables only2022-10-21 11:22MIT License
4Disabled system triggers (i.e., disabled enforcement of constraints)These triggers should be enabled because otherwise some important functionality regarding constraints like enforcing referential integrity does not work.Problem detectionsystem catalog base tables only2021-03-12 15:06MIT License
5Disabled user triggersIdentify disabled triggers. These should be enabled or dropped, otherwise these are dead code.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
6Empty columnsFind columns in non-empty tables that do not contain any values. If there are no values in a columns, then it may mean that one hasn't tested constraints that have been declared to the column or implemented by using triggers. It could also mean that such columns are not needed at all.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
7Empty schemasFind schemas without schema objects.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-04 15:30MIT License
8Empty tablesFind base tables where the number of rows is zero. If there are no rows in a table, then it may mean that one hasn't tested constraints that have been declared to the table or implemented by using triggers. It could also mean that the table is not needed because there is no data that should be registered in the table.Problem detectionsystem catalog base tables only2022-10-21 15:55MIT License
9Potentially unused sequence generatorsFind sequence generators that are not associated with any column through the default value mechanism. Please note, that it is also possible to refer to a sequence generator from a routine or from an application. If these are indeed not used, then these should be dropped, otherwise these are dead code.Problem detectionINFORMATION_SCHEMA only2021-03-07 20:56MIT License
10Unused composite types (for table columns, typed tables, input and output parameters)Find user-defined composite types that are not used in case of any table, column, and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
11Unused domains (for base table columns and parameters)Find domains that are not used in case of any base table column and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
12Unused enumerated types (for base table columns, domains, and parameters)Find enumerated types that are not used in case of any base table column, domain, and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
13Unused foreign data wrappersFind foreign data wrappers that do not have any associated foreign servers.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
14Unused foreign serversFind foreign servers that do not have any associated foreign tables.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
15Unused named input parametersFind named input parameters that are not referenced in the routine body. All the parameters that are presented in the routine signature declaration must be used in its body. Otherwise these are dead code elements.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-05 13:03MIT License
16Unused schemasDo not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
17Unused trigger functionsDo not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
18Very similar (but not equal) routine namesFind pairs of names of different types of routines that are very similar but not equal.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-11-30 12:09MIT License
19Very similar domain namesFind pairs of names of domains that are very similar or even equal.Problem detectionINFORMATION_SCHEMA only2024-11-30 12:07MIT License
20Very similar table namesFind pairs of names of different types of tables that are very similar or even equal.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-11-30 11:50MIT License