Seq nr | Name | Goal▲ | Type | Data source | Last update | License | ... |
---|---|---|---|---|---|---|---|
621 | 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 | |
622 | Incorrect characterization of a user-defined routine as a "stable" routine | Find stable routines that contain INSERT, UPDATE, DELETE, SELECT … FOR UPDATE, or LOCK statement. The DBMS should get a correct background information about the behaviour of a routine. Stable routines cannot modify data in a database, lock tables, or its specific rows. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-11-05 13:59 | MIT License | |
623 | STATEMENT level triggers that refer to the values of row variables NEW or OLD | Find STATEMENT level triggers that refer to the values of row variables NEW or OLD. NEW and OLD are special variables that can only be used in row-level trigger procedures. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-12-20 14:23 | MIT License | |
624 | Number of using views | Find statistics about how many base tables have how many derived tables that use these tables. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-01-14 13:42 | MIT License | |
625 | Number of used tables | Find statistics about how many derived tables have how many different underlying tables. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-01-14 13:43 | MIT License | |
626 | Subqueries of derived tables with LIMIT/FETCH/DISTINCT ON without ORDER BY | Find subqueries of derived tables (views, materialized views) with the LIMIT/FETCH clause or with DISTINCT ON construct but without the ORDER BY clause. These constructs require sorting to produce a meaningful result. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-03 16:56 | MIT License | |
627 | Potentially missing sequence generators (based on column names and types) | Find surrogate key columns that do not have an associated sequence generator. Surrogate key values must be generated by using the system (the sequence generator mechanism in case of PostgreSQL). If there are no sequence generators, then there is a question as to whether there are no surrogate keys in the database at all (could be possible and OK) or (more probable) developers have forgotten to implement the generation of surrogate keys. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-03-08 00:44 | MIT License | |
628 | Surrogate key columns that do not follow the naming style | Find surrogate key columns that name does not end with "id_" or start with "id_". | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-16 12:19 | MIT License | |
629 | Surrogate key columns | Find surrogate keys. Surrogate key is a key that consist of one column, which has an integer type. The key has been declared by using PRIMARY KEY or UNIQUE constraint. The column is associated with a sequence generator (either external or internal, i.e., created by the system automatically because the column has been declared as an identity column). The column does not participate in any foreign key. | General | INFORMATION_SCHEMA+system catalog base tables | 2021-03-07 20:59 | MIT License | |
630 | The generator of surrogate key values can output the same value more than once | Find surrogate keys where the generator can output the same value more than once. Key values must be unique, i.e., at some point the generator will prevent adding new rows to the table. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-03-08 00:40 | MIT License | |
631 | All system-defined TOAST-able types | Find system-defined types in case of which the system can use the TOAST technique, i.e., save the value in a compressed form or store it in a automatically-created secondary table, which is hidden from the database user (TOAST table). | General | system catalog base tables only | 2020-11-06 14:51 | MIT License | |
632 | Perhaps an overcomplicated constraint expression that compares the result of a Boolean expression with a Boolean value | Find table and domain CHECK constraints that compare the result of a Boolean expression with a Boolean value. If you can choose between two logically equivalent Boolean expressions choose the more simple expression. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-30 11:57 | MIT License | |
633 | 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 | |
634 | Perhaps an unnecessary default value (the empty string or a string that consists of only whitespace) of a base table column/domain | Find table columns and domains with the default value that is the empty string or a string that consists of only whitespace (for instance, newlines, spaces). | Problem detection | INFORMATION_SCHEMA only | 2021-03-20 11:42 | MIT License | |
635 | CHAR or VARCHAR columns have a default value that length is longer from the character maximum length of the column | Find table columns with CHAR or VARCHAR type that have a default value that length is longer from the character maximum length of the column. Choose a suitable data type, field size, and default value. If the value is longer, then it is impossible to register it in a field, i.e., it makes registration of data impossible (except if the excessive characters are spaces). | Problem detection | INFORMATION_SCHEMA only | 2022-10-31 10:19 | MIT License | |
636 | Inconsistency between the type and the default value of a column (date and timestamp values) | Find table columns with timestamp/date types that data type and dynamically found default value have a different type. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:29 | MIT License | |
637 | Inconsistency between the type and the default value of a column (time values) | Find table columns with time types, which data type and dynamically found default value have a different type. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:29 | MIT License | |
638 | Too generic names (table constraints) | Find table constraints (constraints that are associated directly with the table) that have too generic names like "key" or the name contain too generic words like "data" (all constraints restrict data in the table), or the name is an abbreviation of a constraint type name. | Problem detection | system catalog base tables only | 2023-01-08 10:40 | MIT License | |
639 | A non-parameterized table function instead of a view | Find table functions that do not have any parameters. Prefer simpler and more portable solutions. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-11-03 21:16 | MIT License | |
640 | Table functions with OFFSET | Find table functions that use OFFSET. OFFSET method is a common way for implementing pagination. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-09 12:13 | MIT License |