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...
481More than one index on a columnFind base table columns that belong to more than one index (including automatically created indexes that support constraints).Generalsystem catalog base tables only2021-11-10 14:44MIT License
482Multicolumn CHECK constraints with with inconsistent Boolean expressionsFind CHECK constraints that involve two columns, i.e., the cardinality of the constraint is 2, the columns have the same name in different tables, and the Boolean expressions of these constraints are different. For instance, in one table it is last_change_time>=reg_time and in another table it is not (reg_time>last_change_time).Problem detectionsystem catalog base tables only2024-11-30 10:46MIT License
483Multiple columns in the same base table that are associated with a sequence generatorFind base tables where multiple columns are associated with a sequence generator. Do not create unnecessary sequence generators. If one uses in a table a surrogate key, then it is enough to have one column where the values are generated by using a (external or internal) sequence generator.Problem detectionINFORMATION_SCHEMA only2021-03-08 00:41MIT License
484Multiple deletes from the same table in a routineCode should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of deleting different rows of the same table with different DELETE statements one should try to do it with one statement. The query excludes routines where IF statement is used.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-24 14:15MIT License
485Multiple inheritanceFind instances of multiple inheriance of base tables. Make sure that multiple inheritance is indeed needed.Generalsystem catalog base tables only2020-11-15 12:20MIT License
486Multiple RETURNING clauses in a SQL functionFind SQL functions that have multiple statements with the RETURNING clause.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-21 13:59MIT License
487Multiple selects from the same table in a routineCode should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of selecting different fields of the same row with different SELECT INTO statements one should try to do it with one statement.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 12:10MIT License
488Multiple simple keys with integer valuesFind base tables that have more than one primary key or unique constraints that involve exactly one integer column. Do not overcomplicate the database. Perhaps some column in the table is redundant.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-03 11:15MIT License
489Multiple tables share the same state classifierFind cases where multiple tables share the same state classifier. For each main entity type one should create a separate state classifier table. Even if the classifier values are the same in case of two entity types for now these may become different in the future. Having a shared state classifier table usually means very simplistic state machines (states active and inactive) that could point to the gaps in analysis.Problem detectionsystem catalog base tables only2023-12-30 15:51MIT License
490Multiple triggers that update tsvector valuesFind base tables that have multiple triggers to update tsvector values.Problem detectionsystem catalog base tables only2023-11-07 10:14MIT License
491Multiple updates of the same table in a routineCode should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of updating different fields of the same table with different UPDATE statements one should try to do it with one statement.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-24 13:59MIT License
492Name and description maximum lengthFind tables where is both a column for registering name and description. Find the permitted maximum field size in these columns. Take into account that the maximum length may be controlled by using a CHECK constraint. Make sure that the permitted maximum field sizes are sufficiently different.GeneralINFORMATION_SCHEMA+system catalog base tables2021-02-24 20:36MIT License
493Name contains only consonants and digitsFind names of database objects that contain only consonants and digits.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-12-21 17:18MIT License
494Name does not contain any vowelsFind names of database objects that do not contain any vowels.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-12-21 17:19MIT License
495Name does not contain any vowels (aggregate view)Find aggregate information about the names of database objects that do not contain any vowels.Sofware measureINFORMATION_SCHEMA+system catalog base tables2024-12-21 17:19MIT License
496Names of character classes are not in the lowercaseFind regular expressions where the names of character classes are not completely in lowercase. For instance, incorrect is to write [[:UPPER:]] or [[:Upper:]] and correct is [[:upper:]].Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 13:22MIT License
497Names of columns that hold personal names but do not take into account cultural diversityFind columns of tables (base tables, views, materialized views, foreign tables) that have the name first_name or last_name. Such column names do not take into account that different cultures use different personal name components and the number of possible components is more than two. If in a culture, the surname is presented before the given name, then the column names causes confusion.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
498Names of columns with the type BOOLEANThe naming of BOOLEAN columns must be consistent. For the better readability the names of such columns could have prefix "is_" (in English) or "on_" (in Estonian)GeneralINFORMATION_SCHEMA+system catalog base tables2024-01-03 09:41MIT License
499Names of constraints (directly connected to a base table) and non-unique indexes that do not contain the associated column nameFind constraints that are perhaps badly named. Find names of constraints (directly connected to a base table) and non-unique indexes that do not contain the associated column name.Problem detectionsystem catalog base tables only2022-10-21 10:41MIT License
500Names of constraints (directly connected to a base table) that do not contain the table nameFind constraints that are perhaps badly named. Table names help us to ensure the uniqueness of the names within a schema and make the names more expressive and user-friendly.Problem detectionsystem catalog base tables only2023-01-10 18:03MIT License