Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
1 | CHECK constraints that perhaps do not consider 'infinity' and '-infinity' special values | Find check constraints of base tables that cover exactly one column where the default value of the column is special value 'infinity' or '-infinity'. Find only such constraints that probably check a range of permitted values but do not consider that one of the values might be 'infinity' or '-infinity'. Such special values belong to the types DATE, TIMESTAMP, NUMERIC, REAL, and DOUBLE PRECISION. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-05-08 18:58 | MIT License | |
2 | Definition of a non-minimal superkey instead of a candidate key (based on check constraints) | Candidate key is a minimal superkey, meaning that it is not possible to remove columns from the candidate key without losing its uniqueness property. One should define primary key's and unique constraints based on candidate keys. Find primary key and unique constraints where a proper subset of columns has a check constraint that permits only one value in the column. The candidate key should involve only columns without such constraint. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-04-30 20:25 | MIT License | |
3 | Only one value permitted in a non-inherited base table or a foreign table column (based on check constraints) | Find columns of base tables or foreign tables in case of which a check constraint on the column permits only one value in the column. Exclude columns that are inherited from a supertable because the constraint may be correct if it is applied to a column of a subtable that is inherited from the supertable. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-04-30 20:16 | MIT License | |
4 | Only one value permitted in a base table or a foreign table column (based on check constraints) | Find columns of base tables or foreign tables in case of which a check constraint on the column permits only one value in the column. The constraint may be correct if it is applied to a column of a subtable that is inherited from the supertable or is used to enfore the rule that the table can have at most one row. | General | INFORMATION_SCHEMA+system catalog base tables | 2024-04-30 20:14 | MIT License | |
5 | YELLING IN COMMENTS! | Find comments of derived tables and routines that consist of only uppercase letters. Do not use only uppercase (capital) letters in order to write comments. It means yelling and also makes text less readable. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-04-25 15:13 | MIT License | |
6 | The SQL-language routines with the body that is string literal | Find SQL-language routines that have the body that is string literal, i.e., the body is not SQL-standard function body. Routines with a SQL-standard body are permitted starting from PostgreSQL 14. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-24 18:20 | MIT License | |
7 | Unbalanced brackets | Write expressions correctly. Find code fragments that have unbalanced brackets, i.e., the number of opening brackets is not the same as the number of closing brackets. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-24 16:02 | MIT License | |
8 | Input parameters with the same name have different types | Find named input parameters of routines that have the same name but different type. It could be a mistake or deliberate due to overloading of routines. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-24 15:01 | MIT License | |
9 | Multiple deletes from the same table in a routine | Code should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of deleting different rows of the same table with different DELETE statements one should try to do it with one statement. The query excludes routines where IF statement is used. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-24 14:15 | MIT License | |
10 | Multiple updates of the same table in a routine | Code should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of updating different fields of the same table with different UPDATE statements one should try to do it with one statement. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-24 13:59 | MIT License | |
11 | Inconsistent use of older and newer join syntax in the subqueries of derived tables | Find as to whether the subqueries of derived tables use both older join syntax (join condition in the where clause) and newer syntax (join condition in the from clause). | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-24 13:26 | MIT License | |
12 | Unused indexes (2) | Find indexes that are not used by the DBMS. Remember that indexes are not a "free lunch" and they slow down the processes of updating data. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-19 00:28 | MIT License | |
13 | Unused indexes | Find indexes that are not used by the DBMS. Remember that indexes are not a "free lunch" and they slow down the processes of updating data. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-01-19 00:23 | MIT License | |
14 | The number of routines by the number of input parameters | Find the number of user-defined non-trigger routines by the number of input parameters. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-01-16 09:43 | MIT License | |
15 | The number of user-defined routines based on their database usage | Find the number of non-extension routines in a database that modify data. The routines can be used to implement virtual data layer. Thus the queriy gives some indications about the possible extent of the layer. The query distinguishes trigger and non-trigger routines, thus it also gives information about triggers that modify data. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-01-15 00:38 | MIT License | |
16 | The number of user-defined non-trigger routines by schema, by language, and by routine type | Find the number of user-defined non-trigger routines based on their schema, language, and routine type. The routines can be used to implement virtual data layer. Thus the queriy gives some indications about the possible extent of the layer. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-01-14 20:53 | MIT License | |
17 | The number of user-defined non-trigger routines by schema, by security type, and by being deterministic | Find the number of user-defined non-trigger routines based on their schema, security type, and being deterministic. The routines can be used to implement virtual data layer. Thus the queriy gives some indications about the possible extent of the layer. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-01-14 20:52 | MIT License | |
18 | The number of commented routines | Find the number of commented routines based on the way how the comments have been added (as a COMMENT object or as a comment in the routine body). | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-01-14 20:49 | MIT License | |
19 | The number of user defined triggers by different characteristics | Find the number of user defined triggers by action orientation (ROW, STATEMENT), action timing (BEFORE, AFTER, INSTEAD OF), and event type (INSERT, UPDATE, DELETE) and their combinations. | Sofware measure | INFORMATION_SCHEMA only | 2024-01-14 17:41 | MIT License | |
20 | Updatable views with WHERE clause that do not have WITH CHECK OPTION constraint | Find updatable views that restrict rows, i.e., have WHERE clause, but do not have WITH CHECK OPTION constraint. WITH CHECK OPTION constraint prevents updates through the view that violate the predicate of the view. Such updates must be prevented. | Problem detection | INFORMATION_SCHEMA only | 2024-01-14 17:11 | MIT License |