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

AND
AND
AND
ANDFrom where does the query gets its information?
AND
AND

There are 996 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
201Unused foreign serversFind foreign servers that do not have any associated foreign tables.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
202Updatable views that do not have WITH CHECK OPTION constraintFind updatable views that do not have WITH CHECK OPTION constraint. WITH CHECK OPTION constraint prevents updates through the view that violate the predicate of the view. Such updates must be prevented.Problem detectionINFORMATION_SCHEMA only2023-10-29 10:33MIT License
203Updatable views with WHERE clause that do not have WITH CHECK OPTION constraintFind updatable views that restrict rows, i.e., have WHERE clause, but do not have WITH CHECK OPTION constraint. WITH CHECK OPTION constraint prevents updates through the view that violate the predicate of the view. Such updates must be prevented.Problem detectionINFORMATION_SCHEMA only2024-01-14 17:11MIT License
204Updataple foreign tables that refer to another PostgreSQL tableFind foreign tables that have been defined based on postgresql_fwd foreign data wrapper and that are updatable. Make sure that updatability is in this case needed.GeneralINFORMATION_SCHEMA only2020-11-06 17:15MIT License
205UPDATE triggersFind all UPDATE triggers. Make sure that they specify a correct set of columns in which data modification will fire the trigger.GeneralINFORMATION_SCHEMA only2023-12-22 09:47MIT License
206UPDATE triggers where updated columns have not been specified (the trigger could executed too often)Find UPDATE triggers where updated columns are not specified. These triggers could be executed too often because unneeded executions are not prevented.Problem detectionINFORMATION_SCHEMA only2024-12-23 09:53MIT License
207UPDATE triggers where WHEN clause has not been specified (the trigger could executed too often)Find UPDATE triggers where WHEN clause is not specified. These triggers could be executed too often because unneeded executions are not prevented.Problem detectionINFORMATION_SCHEMA only2024-12-23 09:54MIT License
208Use invocation of a precise function instead of casting in a default value expressionBe precise and write as little code as possible. Prefer expressions with simple invocations of functions like localtimestamp, current_timestamp, and current_date over expressions like (now())::date. Find table columns that have a default value that casts the type of the returned value of a non-deterministic function (now, localtimestamp, current_timestamp, and current_date).Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
209Using an internal data type - nameFind base table columns that use type name that is used in system catalog tables. It is not a problem if the column is meant for recording identifiers of database objects.GeneralINFORMATION_SCHEMA only2021-03-30 13:36MIT License
210Very similar domain namesFind pairs of names of domains that are very similar or even equal.Problem detectionINFORMATION_SCHEMA only2024-11-30 12:07MIT License
211Views with the WITH LOCAL CHECK OPTION constraintFind updatable views that have WITH LOCAL CHECK OPTION constraint. The predicate of a view is the conjunction of the predicates of its (directly and indirectly) underlying tables (both base tables and derived tables) as well as the predicate of the view itself. In case of using WITH LOCAL CHECK OPTION constraint "New rows are only checked against the conditions defined directly in the view itself. Any conditions defined on underlying base views are not checked (unless they also specify the CHECK OPTION)." (PostgreSQL manual) Thus, use instead WITH CASCADED CHECK option to instruct the system to check new rows against the entire predicate of the view.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
212A getter does not return a valueFind user-defined SQL and PL/pgSQL routines that do not return a value although the name suggest that it should return a value (starts with "get").Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-06 14:24MIT License
213A large number of triggersShow user-defined triggers if there are more than 9 different trigger routine bodies, i.e., different triggers on different tables that do the same thing count as one trigger.GeneralINFORMATION_SCHEMA+system catalog base tables2023-12-25 11:23MIT License
214All covering indexesFind all covering indexes, which include data from additional columns in leaf blocks.GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-23 11:54MIT License
215All declaratively partitioned tablesFind partitioned tables that have been implemented by using the declarative approach. Declarative partitioning is implemented in PostgreSQL starting from PostgreSQL 10.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 15:13MIT License
216All derived tables that use joining tablesFind all derived tables that join two or more tables.GeneralINFORMATION_SCHEMA+system catalog base tables2024-10-05 18:34MIT License
217All enumerated typesFind all enumerated types.GeneralINFORMATION_SCHEMA+system catalog base tables2022-10-31 10:19MIT License
218All gin indexesFind indexes with less common access methods. Gin indexes are, for instance, used to speed up PostgreSQL's built in full text search.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
219All non-unique indexesFind secondary indexes that have been created in the database.GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-23 11:50MIT License
220All parameters with DEFAULT valuesFind parameters of user-defined routines that have a default value.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License