Seq nr | Name | Goal | Type | Data source▲ | Last update | License | ... |
---|---|---|---|---|---|---|---|
721 | Triggers with the same name within the same schema | Find names of triggers that are used within the same schema more than once. Give different triggers different names. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
722 | Tsvector values are not automatically calculated | Find base table columns with tsvector type in case of which it is not a generated column nor does the table has an associated trigger to calculate the tsvector value automatically. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-07 11:45 | MIT License | |
723 | 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 | |
724 | Unique index definition instead of a key declaration | Find cases where a unique constraint (that is not case-insensitive or partial, i.e., applies only to certain rows) has been enforced by using a CREATE UNIQUE INDEX statement instead declaring a PRIMARY KEY, UNIQUE, or EXCLUDE constraint. You should try to work on as high level of abstraction as possible. According to the ANSI-SPARC Architecture indexes are a part of internal database schema whereas constraints are a part of conceptual schema, i.e., at the higher level of abstraction. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
725 | 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 | |
726 | Unnamed parameters | Find unnamed parameters in PL/PGSQL routines that do not declare aliases for parameters and in SQL routines. Avoid unnamed parameters because dependency on position in case of referencing the parameters makes evolving the code more difficult. In case of unnamed parameters - if one changes the order of parameters in the routine signature, then one has to change the body of the routine in order to use correct references. The bigger is the number of parameters in a routine the more the unnamed parameters make it more difficult to understand the routine. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-03-15 18:16 | MIT License | |
727 | Unnecessary domains | Domain is a reusable artifact. Effort of its creation should be paid off by the advantages that it offers. If a domain is used in case of at most one column of a base table or even if it is used in case of more than one column but it does not specify neither a default value nor a check constraint, then there is no point of creating the domain. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License | |
728 | Unnecessary privileges to use trigger functions | A user that corresponds to an application does not have to have privileges to use trigger functions. If it has these, then it violates the principle of least privilege. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
729 | Unnecessary usage privileges of PUBLIC | PostgreSQL gives by default some privileges to all the present and future database users (PUBLIC). Find usage privileges of collations, domains, foreign data wrappers, foreign servers, and sequences that have been given to PUBLIC. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-12-31 13:53 | MIT License | |
730 | Unsecure SECURITY DEFINER routines | SECURITY DEFINER routines must be secured against the malicious use of pg_temp schema. Find routines that do not explicitly set the search path or do it incorrectly (the search path is between quotation marks) and are thus potential targets of the attack. pg_temp must be the last entry in search_path. The lack of search_path is allowed only if the SQL statements in routines explicitly refer to the schemas that contain the schema objects. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-13 12:07 | MIT License | |
731 | Unused enumerated types (for base table columns, domains, and parameters) | Find enumerated types that are not used in case of any base table column, domain, and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
732 | 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 | |
733 | 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 | |
734 | Unused named input parameters | Find named input parameters that are not referenced in the routine body. All the parameters that are presented in the routine signature declaration must be used in its body. Otherwise these are dead code elements. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-11-05 13:03 | MIT License | |
735 | Unused trigger functions | Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License | |
736 | Updatable views that have not been turned to read only | Find views that are theoretically updatable but do not have INSTEAD OF trigger or DO INSTEAD NOTHING rule to prevent data modifications through the view. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-10-29 10:20 | MIT License | |
737 | Update prevention may prevent legal updates | Find triggers that try prevent updating data in a certain column but prevent also certain legal updates - updates that write to a field a value that was in the field before the update. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2022-07-07 13:12 | MIT License | |
738 | Updating or deleting data in a routine without restricting rows | Find user-defined routines that contain UPDATE or DELETE statement but do not contain any WHERE clause, meaning that at least one UPDATE or DELETE operation influences all the rows of a table. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-29 13:21 | MIT License | |
739 | Usage of base tables | Find for each derived table the list of base tables that are used by the derived table. | General | INFORMATION_SCHEMA+system catalog base tables | 2024-01-14 00:50 | MIT License | |
740 | Useless type indication | Find columns and parameters where the type of the identifier is perhaps explicitly indicated in the name. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-10 14:47 | MIT License |