Seq nr | Name▲ | Goal | Type | Data source | Last update | License | ... |
---|---|---|---|---|---|---|---|
581 | Pairs of non-key column name and type pairs that have in some base tables a default value and some cases not | Find non-key base table columns with the same name and type that have in some cases a default value and some cases not. Be consistent. Columns with the same name and type should probably either always have a default value in case of different tables or never have a default value in case of different tables. "If you do something a certain way, do all similar things in the same way." (Robert C. Martin, Clean Code) | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-03-05 21:01 | MIT License | |
582 | Parameter name contains the routine name | Find parameters that have the same name as the routine. The names may have different uppercase/lowercase characters. Make sure that the naming style is consistent. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-01-06 18:03 | MIT License | |
583 | Parameter name is the same as the name of a used column | If the name of a routine parameter and the name of a column of a table that is used in the routine are the same, then it makes it more difficult to understand the code. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-01-20 13:54 | MIT License | |
584 | Parameter name is the same as the name of a used column (ver 2) | If the name of a routine parameter and the name of a column of a table that is used in the routine are the same, then it makes it more difficult to understand the code. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-01-20 13:54 | MIT License | |
585 | Parameter name is the same as the routine name | Find parameters that have the same name as the routine. The names may have different uppercase/lowercase characters. Make sure that the naming style is consistent. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-01-06 18:03 | MIT License | |
586 | Paramtetes with an array type, XML, JSON, or JSONB type | Find parameters of user-defined routines that type is an array type, xml, json, or jsonb type. Make sure that the parameter name matches the type (perhaps should be in plural). | General | INFORMATION_SCHEMA+system catalog base tables | 2023-01-14 20:21 | MIT License | |
587 | Partial or case insensitive unique indexes | Find partial or case insensitive unique indexes. These implement uniqueness constraints that are impossible to enforce with the help of SQL's regular UNIQUE constraint. | General | INFORMATION_SCHEMA+system catalog base tables | 2020-11-06 14:51 | MIT License | |
588 | Password is unique | Find columns that potentially contains passwords and that participate in a unique constraint or index | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-06-09 13:21 | MIT License | |
589 | Password should not be open text | Find base table columns that name refers to the possibility that these are used to register passwords. Find the columns that have a CHECK constraint that seems to determine the minimal or maximal permitted length of the values in the column. Passwords in a database table must be hashed and salted. Checking the strength of the password by using a check constraint is in this case impossible and the check constraints that try to do it should be removed from the database. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License | |
590 | Patterns of the Boolean expressions of simple CHECK constraints | Find patterns of the Boolean expressions of simple CHECK constraints (involve only one column). Do not solve the same task in different places differently. The same rule could be implemented with CHECK constraints that have different Boolean expressions. "If you do something a certain way, do all similar things in the same way." (Robert C. Martin, Clean Code) | General | INFORMATION_SCHEMA+system catalog base tables | 2022-11-13 16:06 | MIT License | |
591 | Patterns of the names of columns of simple primary keys | Find the patterns of the names of columns of simple primary keys. Make sure that the naming is consistent. Ideally, the names should indicate as to whether the column is a surrogate or a natural key column. PostgreSQL 14 added primary keys, unique constraints, and foreign keys to system catalogs. Thus the query was modified to exclude the results from the system catalog. | General | system catalog base tables only | 2023-01-20 13:40 | MIT License | |
592 | Patterns of the names of PRIMARY KEY, UNIQUE, CHECK, EXCLUDE, and FOREIGN KEY constraints as well as user-defined non-unique indexes that are associated with exactly one column | Find patterns of the names of constraints and indexes. Make sure that the naming is consistent. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-01-14 20:52 | MIT License | |
593 | Patterns of the names of PRIMARY KEY, UNIQUE, CHECK, EXCLUDE, and FOREIGN KEY constraints as well as user-defined non-unique indexes that are associated with two or three columns | Find patterns of the names of constraints and indexes. Make sure that the naming is consistent. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-01-14 20:52 | MIT License | |
594 | Patterns of the names of triggers and rules | Find the patterns of the names of trigger and rule names. Make sure that the naming is consistent. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-01-14 20:51 | MIT License | |
595 | Perahaps Coalesce invocation is missing or Concat should be used | Find user-defined routines and derived tables (views/materialized views) that have a subquery that invokes || operator but does not use Coalesce function to ensure that the arguments are not NULL. In PostgreSQL expression value || NULL returns NULL. In order to get value as the result, one has to replace NULL with a value (empty string) by using, for instance, Coalesce function (an alternative is to use a CASE expression). Instead of || + Coalesce, one could use Concat, Concat_ws, or Format functions for the concatenation. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-12-08 11:51 | MIT License | |
596 | Percentage of optional columns in each base table | What is the percentage of optional columns (that permit NULLs) in case of each base table? It is better to prohibit the use of NULLs in as many columns as possible. Otherwise the results of queries may be misleading. | Sofware measure | INFORMATION_SCHEMA only | 2020-11-08 20:55 | MIT License | |
597 | Percentage of the total index storage size from the total database storage size (system catalog included) | Get overview of disk usage. | Sofware measure | system catalog base tables only | 2020-11-06 14:51 | MIT License | |
598 | Perhaps 0 instead of o | Find the names of database objects where 0 sign is perhaps used instead of o. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 16:25 | MIT License | |
599 | Perhaps a CHECK constraint about required personal name components is missing | Find base tables that have optional columns for recording both given name and surname and do not have a CHECK constraint that requires that at least one of the name components must be registered in case of each person. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-11 12:23 | MIT License | |
600 | Perhaps a CHECK constraint about the combination of truth values is missing | Find base tables that have at least two columns that have Boolean type and have at least one Boolean column that is not covered by a CHECK constraint involving more than one Boolean column. The Boolean columns possibly mean that we want to record data about states. Often the states depend on each other. For instance, if an order is archived it must be inactive. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License |