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 961 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
621Perhaps incorrect default valeFind columns of base tables that have default value CURRENT_USER.Problem detectionINFORMATION_SCHEMA only2023-12-30 11:32MIT License
622Perhaps incorrect use of 'NULL'Find Boolean expressions, queries, routines, and default values that refer to value 'NULL'. Perhaps NULL was intended instead. 'NULL' is a string (a value) but NULL is a special marker for denoting missing value.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 13:19MIT License
623Perhaps incorrect WHEN clauseFind row level triggers that have action condition (WHEN clause) but the Boolean expression in its specifications does not refer to neither NEW nor OLD variable.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
624Perhaps IS DISTINCT FROM should be used instead of <> in WHEN clausesUse a right predicate in trigger condition in order to ensure that the trigger executes always when it has to but not more often. IS DISTINCT FROM treats NULL as if it was a known value, rather than unknown. It would be relevant if a column that is referenced in the action condition is optional, i.e., permits NULLs.GeneralINFORMATION_SCHEMA only2020-12-24 14:30MIT License
625Perhaps is not a snake case - date, time, or by is not preceded by an underscoreFind names that perhaps do not use the snake_case naming style because the name ends with the phrase "date", "time", "by" that is not preceded by an underscore. Prefer snake_case over PascalCase and camelCase in names.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-06 12:12MIT License
626Perhaps is not snake_case - Boolean-indicating prefix without underscoreFind names of types, domains, columns, and parameters that perhaps do not use the snake_case naming style because the name starts with "is", "has", or "on" that is not followed by an underscore. Prefer snake_case over PascalCase and camelCase in names.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-06 11:46MIT License
627Perhaps is not snake_case - id, code, key, or nr is not followed by an underscoreFind names that perhaps do not use the snake_case naming style because the name starts with the phrase "id", "uuid", "code" , "kood", "key", or "nr" that is not followed by an underscore. Prefer snake_case over PascalCase and camelCase in names.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-15 17:19MIT License
628Perhaps is not snake_case - id, code, key, or nr is not preceded by an underscoreFind names that perhaps do not use the snake_case naming style because the name ends with the phrase "id", "uuid", "code", "kood", "key", or "nr" that is not preceded by an underscore. Prefer snake_case over PascalCase and camelCase in names.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-31 11:17MIT License
629Perhaps is not snake_case - long subsections without underscoresFind names that perhaps do not use the snake_case naming style because the name contains a long subsection (at least 20 characters) without underscores. Prefer snake_case over PascalCase and camelCase in names.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-18 16:47MIT License
630Perhaps last update time trigger is missingFind base tables that have a column for last update time but the table does not have associated before update row level trigger for changing the last update time.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-30 15:22MIT License
631Perhaps primary key columns could be renamedFind the names of simple primary key columns that name does not follow the pattern _id or _code but it is quite similar.Problem detectionsystem catalog base tables only2022-12-01 14:34MIT License
632Perhaps spaces are unnecessarily restrictedFind base table columns that name refers to the possibility that the column is used to record names or textual descriptions but the column seems to have a simple check constraint that restricts spaces in these.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-18 13:30MIT License
633Perhaps the column type should be UUIDFind base table columns that do not have uuid type but the name of the column refers to the possibility that the values in the column are uuid's.Problem detectionINFORMATION_SCHEMA only2022-06-09 15:07MIT License
634Perhaps the name referes to multiple conceptsFind database objects that name contains words "and" (English) or "ja" (Estonian).Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-16 20:42MIT License
635Perhaps the precision in case of a base table column with NUMERIC/DECIMAL type is too smallMake sure that in case of using the type DECIMAL/NUMERIC as the type of a base table column the precision (the permitted number of digits in the number) is not too small. For instance, the biggest value in the type NUMERIC(1,1) is 0.9.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
636Perhaps the type of a base table column/domain should be BOOLEAN (based on CHECK constraints)Find base table columns and domains that have a CHECK constraint that limits possible values in a manner that seems to indicate that the permitted values represent truth values, i.e., permitted values are 0/1 or true/false.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
637Perhaps the type of a base table column/domain should be BOOLEAN (based on types and default values)Find base table columns and domains that have a textual type and the default value that represents a truth-value. For instance, the type of a column could be VARCHAR and the column has the default value 'TRUE'.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
638Perhaps the type of a base table column/domain should be INTEGER/SMALLINT/BIGINT (based on sequence generators)Specify for each column/domain a right data type that takes into account expected values in the column/domain. Find base table columns and domains that refer to the nextval function by using the default value mechanism but do not have the type INTEGER, SMALLINT, or BIGINT. This check is performed in case of identity columns: ERROR: identity column type must be smallint, integer, or bigint.Problem detectionINFORMATION_SCHEMA only2021-03-04 11:24MIT License
639Perhaps the type of a base table column/domain should be numeric (based on default values)Specify for each column/domain a right data type that takes into account expected values in the column/domain. Find base table columns and domains that have a textual type but the default value that represents a number (for instance, '100', '2', or '0.22'). Exclude columns about formats.Problem detectionINFORMATION_SCHEMA only2023-12-30 10:59MIT License
640Perhaps the type of a base table column/domain should be temporal (based on default values)Find base table columns and domains that have a textual type but the default value that represents a temporal value (either a static value or invocation of a function that returns such value). Specify for each column/domain a right data type that takes into account expected values in the column/domain.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License