Seq nr | Name▲ | Goal | Type | Data source | Last update | License | ... |
---|---|---|---|---|---|---|---|
661 | Perhaps the type of a base table column should be BOOLEAN (based on column names) | Find base table columns that based on the name seem to hold truth values. Find columns that name starts with "is_" or "has_" or "can_" or "on_" and that do not have Boolean type. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-03 09:41 | MIT License | |
662 | 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 | |
663 | Perhaps the type of a base table column should be XML, JSON, or JSONB (based on column names) | Find base table columns that name refers to the possibility that these are used to register XML/JSON values. Find the columns that do not have an appropriate data type (xml, json, jsonb). One shouldn't use columns with a textual type to register such data. | Problem detection | INFORMATION_SCHEMA only | 2021-03-28 15:30 | MIT License | |
664 | Perhaps the type of a parameter should be BOOLEAN (based on parameter names) | Find routine parameters that based on the name seem to hold truth values. Find parameters that name starts with "is_" or "has_" or "can_" or "on_" and that do not have Boolean type. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-03 00:10 | MIT License | |
665 | Perhaps too many different prefixes in the names of database objects that have the same type | 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 should refer to the type of the database object. Do not use different prefixes in the names of database objects that have the same type. Find types of database objects in case of which there are different prefixes in different names. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 16:20 | MIT License | |
666 | Perhaps too many different suffixes in the names of database objects that have the same type | One should be consistent in naming, including in the use of suffixes. If you use sufix in the name of a database object, then it should refer to the type of the database object. Do not use different suffixes in the names of database objects that have the same type. Find types of database objects in case of which there are different suffixes in different names. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:16 | MIT License | |
667 | Perhaps too many input parameters | Too many parameters (in this case four or more) could be a sign of not separating concerns and having a routine that has more than one task. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-19 15:07 | MIT License | |
668 | Perhaps too many square brackets | Character classes are surrounded by two pairs of square brackets. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-15 10:47 | MIT License | |
669 | Perhaps too many subconditions in a CHECK constraint | Find check constraints of base table and foreign table columns that are either associated with more than one column and have at least one AND operation or are associated with exactly one column and have two or more AND operations. | Problem detection | INFORMATION_SCHEMA only | 2024-12-11 23:29 | MIT License | |
670 | Perhaps Trim is missing | Find derived tables (views and materialized views) that apparently concatenate values (by using || operator or use Concat function or use Format function) by putting a space between these but do not use Trim function to get rid of the extra space at the beginning or the end of the string. | Problem detection | system catalog base tables only | 2023-12-13 13:53 | MIT License | |
671 | 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 | |
672 | 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 | |
673 | Perhaps unnecessary privileges to use the database | Find as to whether a database user (except postgres), who is not a superuser, has Create (C) or Temporary (T) privileges to use the database. | Problem detection | system catalog base tables only | 2021-11-23 20:42 | MIT License | |
674 | Perhaps unnecessary Trim | Find constraints where the use of Trim function is possibly unnecessary. CHECK constraint column!~'^[[:space:]]*$' already ensures that the values in the column cannot be empty strings or strings that consist of only whitespace. Trim(Column)!~'^[[:space:]]*$' - in this case the use of Trim function is unnecessary. | Problem detection | INFORMATION_SCHEMA only | 2024-12-25 15:27 | MIT License | |
675 | Perhaps unnecessay regular expression | Find occurrences of possibly pointless regular expressions - i.e., value contains zero or more symbols. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-27 18:37 | MIT License | |
676 | Perhaps updating of modification time is missing | Find routines with SQL-standard body that seem to update data in a table that has a column for modification time but the routine does not seem to update the modification time while updating the row and the table does not seem to have an UPDATE trigger that changes the modification time. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-23 11:55 | MIT License | |
677 | Perhaps USING syntax could be used for joining in the subqueries of derived tables | Find derived tables that use newer join syntax where join conditions are written in the WHERE clause but do not use USING synatx. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-10 14:14 | MIT License | |
678 | Permitting in a column only empty strings and strings that consist of whitespace characters | Find table CHECK constraints that permit in a column only empty strings or strings that consist of only whitespace characters. | Problem detection | INFORMATION_SCHEMA only | 2021-12-19 15:10 | MIT License | |
679 | Personal names are unique | Find all primary key and unique constraints of base tables that involve at least one column with personal names. Personal names are not unique and these cannot be (usually) used to guarantee uniqueness. Either one has declared a superkey instead of candidate key (i.e., the key contains a column that is not needed for uniqueness) or the key columns have been found incorrectly. | Problem detection | system catalog base tables only | 2021-02-25 17:29 | MIT License | |
680 | Phone number column has an incorrect data type | Find the columns where the name reffers to the possibility that the column contains phone numbers but the type of the column is not VARCHAR or TEXT. | Problem detection | INFORMATION_SCHEMA only | 2021-03-27 19:00 | MIT License |