Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
61 | Perhaps incorrect default vale | Find columns of base tables that have default value CURRENT_USER. | Problem detection | INFORMATION_SCHEMA only | 2023-12-30 11:32 | MIT License | |
62 | Incorrect data type (based on default values) | Find columns of base tables that have the default value CURRENT_USER or SESSION_USER but the data type is CHAR or TEXT. | Problem detection | INFORMATION_SCHEMA only | 2023-12-30 11:06 | MIT License | |
63 | Incorrect field size (based on default values) | Find columns of base tables that have the default value CURRENT_USER or SESSION_USER but the field size is not 63 (default maximum identifier length in PostgreSQL). | Problem detection | INFORMATION_SCHEMA only | 2023-12-30 11:05 | MIT License | |
64 | Do not format comma-separated lists (based on default values) | Find, based on default values, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table or a foreign table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters. | Problem detection | INFORMATION_SCHEMA only | 2023-12-30 10:59 | MIT License | |
65 | Perhaps 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 detection | INFORMATION_SCHEMA only | 2023-12-30 10:59 | MIT License | |
66 | Do not leave out the referential constraints (based on column names) (2) | Try to find missing foreign key constraints. Find columns of base tables that are not a part of any primary key, unique, and foreign key constraint, but have a name that reffers to the possibility that these are used to record references to a user. Exclude columns that have the default value CURRENT_USER or SESSION_USER. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-30 10:29 | MIT License | |
67 | Perhaps unnecessary DECLARE section in a PL/pgSQL routine | Find PL/pgSQL routines that perhaps unnecessarily contain DECLARE section. More specifically, find routines with the DECLARE section where the only task seems to be raising an exception. The query excludes the cases where the error message is constructed dynamically, i.e., in this case using a variable maybe justifiable. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-30 10:19 | MIT License | |
68 | CHECK constraints on columns with personal names | Find CHECK constraints on base table or foreign table columns that contain data about personal names. Make sure that the constraints do not restrict registration of legal names. | General | INFORMATION_SCHEMA only | 2023-12-25 12:51 | MIT License | |
69 | CHECK constraints with the cardinality bigger than one that involve the same set of columns | CHECK constraints with the cardinality bigger than one that involve the same set of columns. Make sure that there is no duplication. | General | system catalog base tables only | 2023-12-25 12:39 | MIT License | |
70 | CHECK constraints with the cardinality bigger than one | Find multicolumn CHECK constraints. Such constraints must be associated directly with a base table, i.e., these cannot be associated with a domain. Enforce as much data integrity as possible at the database level and prefer declarative constraints to a trigger. | General | system catalog base tables only | 2023-12-25 12:38 | MIT License | |
71 | CHECK constraints on columns with temporal data | If your table contains columns with temporal data, then it will be appropriate to restrict the range of possible values in these columns because some of the values that belong to the type might not be appropriate (for instance, imagine a client who was born in 1100-12-03 or a contract that was registered in 3890-12-12- 12:45). If your table contains multiple columns with temporal data that denote events, then the rule about the order of the events must be enforced, if possible. | General | INFORMATION_SCHEMA only | 2023-12-25 12:37 | MIT License | |
72 | Derived table presents the same data in the same way as a single base table | Find derived tables (views and materialized views) that present data from one base table without adding columns, renaming columns, changing the order of columns, removing columns, or restricting rows. Perhaps something is missing from the subquery of the derived table. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-25 12:15 | MIT License | |
73 | A large number of triggers | Show 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. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-12-25 11:23 | MIT License | |
74 | Routine body has keywords that are not in uppercase | Keywords in uppercase improve readability. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-24 17:06 | MIT License | |
75 | Duplicate specification of character classes | Find regular expressions where within the same specification of a character class the character class alnum as well as 0-9, \d, A-Z, or a-z has been defined. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-24 10:43 | MIT License | |
76 | Perhaps unnecessary DECLARE section in a PL/pgSQL routine (2) | Find PL/pgSQL routines that perhaps unnecessarily contain DECLARE section. More specifically, find routines with the DECLARE section where the keyword DECLARE is followed by BEGIN, i.e., the DECLARE section is empty. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-23 13:39 | MIT License | |
77 | Invocation of a system-defined routine without providing any arguments | Find user-defined routines that contain an invocation of a system-defined function without providing any argument. The query considers all aggregate functions as well as some popular scalar functions. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-22 13:00 | MIT License | |
78 | Columns with tsvector type | Find columns of base tables and materialized views that have tsvector type. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-12-22 12:41 | MIT License | |
79 | Data type usage in the base table columns | Get overview of used data types in the columns of base tables. If the selection is very small then this is a warning sign that perhaps unsuitable types have been used. | General | INFORMATION_SCHEMA only | 2023-12-22 12:39 | MIT License | |
80 | Prefixes in the names of database objects | Find for different types of database objects all the prefixes that are used in different names. One should be consistent in naming, including in the use of prefixes. If you use prefix in the name of a database object, then it could refer to the type of the database object. Do not use different prefixes in the names of database objects that have the same type. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-12-22 12:39 | MIT License |