Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
741 | Insufficient number of user-defined base tables | There must be at least n (seven in this case) user-defined base tables in the database. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
742 | Insufficient number of user-defined domains | There must be at least n (one in this case) user-defined domains in the database each of that must be used in case of at least two columns of base tables. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
743 | Insufficient number of user-defined foreign tables | There must be at least n (two in this case) user-defined foreign tables in the database. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
744 | Insufficient number of user-defined non-trigger routines | There must be at least n (four in this case) user-defined non-trigger routines in the database. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
745 | Insufficient number of user-defined views | There must be at least n (four in this case) user-defined views in the database. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
746 | JSON type instead of JSONB type | "In general, most applications should prefer to store JSON data as jsonb, unless there are quite specialized needs, such as legacy assumptions about ordering of object keys." (https://www.postgresql.org/docs/current/datatype-json.html) | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
747 | LIKE without a pattern with % or _ | Find expressions that use LIKE predicate witout a pattern that contains at least one % or _ sign. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
748 | Names of columns that hold personal names but do not take into account cultural diversity | Find 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 detection | system catalog base tables only | 2021-02-25 17:30 | MIT License | |
749 | NOT VALID foreign key constraints | Find not valid foreign key constraints. These constraints have been created so that the existing data has not been checked against the constraint. It could be deliberate in case of legacy systems that have data quality problems. However, ideally all the data in the table conforms to the constraint. | Problem detection | system catalog base tables only | 2021-02-25 17:30 | MIT License | |
750 | Only one value permitted in a base table or a foreign table column (based on enumeration types) | Find columns of base tables or foreign tables in case of which the type of the column permits only one value in the column. The type is an enumeration type that specifies only one value. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
751 | Perhaps incorrect WHEN clause | Find 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 detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
752 | Perhaps 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 detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
753 | Perhaps 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 detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
754 | Perhaps the type of a base table column should be BOOLEAN (based on enumerated types) | Find base table columns that have an enumerated type that seems to emulate Boolean type. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
755 | Publications with no tables | Find publications that do not contain any table. | Problem detection | system catalog base tables only | 2021-02-25 17:30 | MIT License | |
756 | Recursive relationships with the same source and target | Find incorrectly implemented adjacency lists. | Problem detection | system catalog base tables only | 2021-02-25 17:30 | MIT License | |
757 | Recursive triggers that directly modify their home table | Do 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 detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
758 | Reference to the numeric type is too imprecise, i.e., precision and scale are missing | Find 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 detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
759 | ROW-level BEFORE and INSTEAD OF triggers with RETURN NULL | Such triggers effectively cancel data modification. It might be correct but could also be a mistake. "Row-level triggers fired BEFORE can return null to signal the trigger manager to skip the rest of the operation for this row (i.e., subsequent triggers are not fired, and the INSERT/UPDATE/DELETE does not occur for this row). " (PostgreSQL documentation) "INSTEAD OF triggers (which are always row-level triggers, and may only be used on views) can return null to signal that they did not perform any updates, and that the rest of the operation for this row should be skipped (i.e., subsequent triggers are not fired, and the row is not counted in the rows-affected status for the surrounding INSERT/UPDATE/DELETE). " (PostgreSQL documentation) | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
760 | ROW level BEFORE triggers with RAISE EXCEPTION but without RETURN NULL | Although RAISE EXCEPTION stops the execution it would be a good style to still return. In this case the return should bring back NULL, i.e., the row will not be processed further | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License |