Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
81 | Triggers with arguments from the CREATE TRIGGER statement | Find triggers that get an argument from the CREATE TRIGGER statement. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-12-22 12:35 | MIT License | |
82 | All rules | Find user-defined rules for rewriting data manipulation language statements. Rules should be used only for the tasks that cannot be achieved in a declarative manner, i.e., for example, by declaring a constraint. | General | system catalog base tables only | 2023-12-22 12:30 | MIT License | |
83 | UPDATE triggers | Find all UPDATE triggers. Make sure that they specify a correct set of columns in which data modification will fire the trigger. | General | INFORMATION_SCHEMA only | 2023-12-22 09:47 | MIT License | |
84 | Unnamed columns in routines | Find user-defined routines that contain a SQL statement that does not give the name to a column in a SQL statement. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-22 00:04 | MIT License | |
85 | Perhaps a reference to the variable NEW is missing | Find row level before insert and before update triggers that only task is not to raise an exception and where the variable NEW is not used in the trigger routine outside the RETURN clause. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-21 20:34 | MIT License | |
86 | Perhaps a reference to the variable OLD is missing | Find row level before delete triggers that only task is not to raise an exception and where the variable OLD is not used in the trigger routine outside the RETURN clause. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-21 19:29 | MIT License | |
87 | User-defined routines that read data | Find user-defined routines that contain SELECT … FROM or PERFORM … FROM operations. PostgreSQL uses multiversion concurrency control (MVCC). Therefore, SELECTs do not block modifications and vice versa. One has to take steps to achieve correct behaviour of data access code. In addition, one should not ask data with multiple queries if it is possible to achieve the result with only one query. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-12-21 15:00 | MIT License | |
88 | Multiple RETURNING clauses in a SQL function | Find SQL functions that have multiple statements with the RETURNING clause. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-21 13:59 | MIT License | |
89 | Columns of derived tables that name has been given by the system (2) | Find columns of derived tables (i.e., views and materialized views) where in the creation statement of the table the name of the column has not been specified, i.e., it is generated by the system. | Problem detection | system catalog base tables only | 2023-12-21 12:17 | MIT License | |
90 | Columns of derived tables that name has been given by the system | Find columns of derived tables (i.e., views and materialized views) where in the creation statement of the table the name of the column has not been specified, i.e., it is generated by the system. | Problem detection | system catalog base tables only | 2023-12-21 12:15 | MIT License | |
91 | Deterministic (immutable) functions that do not return a value | Find deterministic (immutable) functions that do not return a value. This goes against the idea of deterministic functions. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-20 19:33 | MIT License | |
92 | Base table columns permitting temporal values that may be outside the range of logical values | Find base tables columns with temporal types (date and timestamp) that do not belong to a foreign key and that do not have any associated simple CHECK constraints, i.e., constraint that involves only one column. For instance, in the column registration_time that does not have any associated CHECK constraints could be values '1200-01-01 00:00' or '5900-12-31 00:00'. Rows with these values most probably represent wrong propositions and the system should restrict registration of such data. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-17 00:40 | MIT License | |
93 | FILLFACTOR is probably too big | Find base tables in case of which the FILLFACTOR property has perhaps a too big value. Try to find base tables that probably encounter UPDATE operations. In the tables that have frequent updates you want to have free space in table pages (blocks) to accommodate new row versions, which the system automatically creates as a result of fulfilling UPDATE statements. If a new row version will be put to another page by the system, then it means that table indexes have to be updated as well. Thus, the more there are indexes, the more the table would benefit from keeping a new row version in the same page as the old version. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-17 00:22 | MIT License | |
94 | Not equals check in unstandardized way | Find user-defined routines that use != operator to test as to whether two values are not equal. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-13 14:16 | MIT License | |
95 | 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 | |
96 | User-defined derived tables | Find user-defined views and materialized views. Pay attention to the outer join operations. One should use these if and only if there is a real need for them. Otherwise they just reduce performance. On the other hand, pay attention that outer join is used where it is logically needed. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-12-11 15:23 | MIT License | |
97 | Explicit locking | PostgreSQL uses Multi-version Concurrency Control (MVCC) and thus, sometimes, one has to explicitly lock certain rows or entire table. One has to use LOCK TABLE or SELECT … FOR UPDATE statements for that. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-12-11 15:02 | MIT License | |
98 | Incorrect comparison operator | Find PL/pgSQL routines that use comparison operators =< or =>. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-11 14:50 | MIT License | |
99 | A routine is invoked only once | Find user-defined routines that are invoked by exactly one user-defined routine. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-10 17:11 | MIT License | |
100 | Perhaps inconsistent use of temporal functions | Find routines that use temporal functions CURRENT_TIMESTAMP, LOCALTIMESTAMP, or now() that is inconsistent with the default values of the columns that are used by the routine, e.g., function uses a column with the default value LOCALTIMESTAMP but the routine uses function CURRENT_TIMESTAMP or now(). | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-10 17:11 | MIT License |