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...
701Recursive rules that directly modify their home tableDo not cause potentially infinite loops. Recursive rules would fire itself over and over again. Although the system is able to detect these after executing a data modification statement it is better to avoid creating these altogether.Problem detectionsystem catalog base tables only2022-10-21 15:59MIT License
702Recursive triggers that directly modify their home tableDo not cause potentially infinite loops. Recursive trigger fire themselves over and over again. If the system is not able to stop these, then it eventually consumes all the resources of the system. Although the system is able to detect these it is better to avoid creating these altogether.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
703Redundant indexesFind indexes that may be redundant. In addition to identical indexes it also considers indexes that cover the same columns and have the same properties except uniqueness. The query considers all types of indexes, including indexes that have been automatically created to support a constraint and function-based indexes.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
704Reference to the numeric type is too imprecise, i.e., precision and scale are missingFind base table columns that have the DECIMAL/NUMERIC type, but do not have precision and scale specified. "Specifying: NUMERIC without any precision or scale creates a column in which numeric values of any precision and scale can be stored, up to the implementation limit on precision. A column of this kind will not coerce input values to any particular scale, whereas numeric columns with a declared scale will coerce input values to that scale."Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
705Referential degree of a schemaReferential degree of a schema is defined as the number of foreign keys in the database schema.Sofware measureINFORMATION_SCHEMA only2020-11-13 11:30MIT License
706Referential degree of tablesThis metric represents the number of foreign keys in a base table.Sofware measureINFORMATION_SCHEMA only2021-03-12 11:07MIT License
707Referential degree of tables (ver 2)Find how many base tables are referenced from a base table by using foreign keys.Sofware measuresystem catalog base tables only2021-03-12 11:06MIT License
708Registration/modification time is not automatically setFind columns of base tables that name and type suggest that the column should contain the row registration time or last modify time but the column does not have a default value.Problem detectionINFORMATION_SCHEMA only2021-03-28 17:36MIT License
709Registration/modification time is not mandatoryFind columns that contain registration or modification time but are optional.Problem detectionINFORMATION_SCHEMA only2023-11-26 16:51MIT License
710Regular expression with possibly a LIKE patternFind expressions that use a regular expression with a like predicate pattern.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-10-21 11:11MIT License
711Routine body has keywords that are not in uppercaseKeywords in uppercase improve readability.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-24 17:06MIT License
712Routine body only in uppercaseUppercase means screaming and having code entirely in uppercase makes its reading more difficult. On the other hand, it would be a good idea to have keywords in uppercase. Find routines that body contains a SQL data manipulation statement (which shouldn't be entirely in uppercase) but still the body is completely in uppercase.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 20:12MIT License
713Routine body with ordering the query result based on positional referencesFind routines where the query result is sorted based on the column number in the SELECT clause. Such query is sensitive towards changing the order of columns in the SELECT clause, i.e., if one changes the order of columns in the SELECT clause, then one must change the numbers in the ORDER BY clause as well, otherwise the query will produce undesired order of rows.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-10-31 15:23MIT License
714Routine for reading data uses another routine to read some dataFind routines that only read data but invoke some other routine to read some more data.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-10 17:10MIT License
715Routines that can be invoked with a variable number of argumentsFind routines with a VARIADIC parameter. These are routines that take as input an undefined number of arguments where the argument that is an undefined number are all of the same type and are the last input arguments.GeneralINFORMATION_SCHEMA+system catalog base tables2021-11-04 12:37MIT License
716Routines that use old syntax for limiting rowsFind PL/pgSQL routines and SQL routines that do not have SQL-standard body that use unstandardized LIMIT clause instead of standardized FETCH FIRST n ROWS clause. The query excludes routines that are a part of an extension.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-10-29 11:34MIT License
717Routines with BOOLEAN return type that do not have a good nameThe prefic of the name should be "is_" or "has_" or "can_" (in English) or "on_" (in Estonian). Worse: check_rights. Better: has_rights.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-13 20:41MIT License
718Routines with INSERT statements that are sensitive towards the order of columnsINSERT statements shouldn't be sensitive towards the order of columns. If one changes the order of columns in a table then these statements must be rewritten. Otherwise the code will not work or works incorrectly.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 16:15MIT License
719Routines without an actionFind routines that body does not contain any action.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-05 12:14MIT License
720Routines with the same name and parameters in different schemasFind user-defined routines with the same name and parameters (including the order of parameters) in different schemas.GeneralINFORMATION_SCHEMA+system catalog base tables2021-10-25 16:11MIT License