Seq nr | Name | Goal▲ | Type | Data source | Last update | License | ... |
---|---|---|---|---|---|---|---|
721 | 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 | |
722 | 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 | |
723 | 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 | |
724 | The use of xmin hidden column in views and routines | Find the number of views and materialized views that have a column with the xid type and the number of routines that contain a UPDATE or a DELETE statement that search condition refers to the xmin column. If one uses optimistic approach for dealing with the concurrent modifications of data, then xmin values should be presented by views and used in routines that modify or delete rows. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2021-11-04 11:56 | MIT License | |
725 | Number of views with and without security barrier | Find the number of views, the number of views with and without security barrier setting, and the names of views with and without the security barrier setting. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-01-14 12:54 | MIT License | |
726 | Very similar column names | Find the pairs of table columns that name is different only by one symbol and that have the same type and/or domain. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-03-18 20:25 | MIT License | |
727 | Patterns of the names of columns of simple primary keys | Find the patterns of the names of columns of simple primary keys. Make sure that the naming is consistent. Ideally, the names should indicate as to whether the column is a surrogate or a natural key column. PostgreSQL 14 added primary keys, unique constraints, and foreign keys to system catalogs. Thus the query was modified to exclude the results from the system catalog. | General | system catalog base tables only | 2023-01-20 13:40 | MIT License | |
728 | Patterns of the names of triggers and rules | Find the patterns of the names of trigger and rule names. Make sure that the naming is consistent. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-01-14 20:51 | MIT License | |
729 | All database privileges | Find the privileges to use the database. c - CONNECT; C - CREATE; T - TEMPORARY. | General | system catalog base tables only | 2021-11-23 20:28 | MIT License | |
730 | Perhaps a routine does not have a real task | Find the routines where the only action is to return an argument value, a constant value, NULL or return the value of OLD or NEW variable in case of trigger functions. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-11-05 12:09 | MIT License | |
731 | The size of base tables and their indexes | Find the size of base tables without indexes, size of the indexes of the table, total size of the table (including its indexes) and percentage of the index size from the total size. If the size of indexes of a table is relatively high, then check as to whether all the indexes are needed. | General | system catalog base tables only | 2023-10-27 20:38 | MIT License | |
732 | The generic names (columns) (aggregate view) | Find the too generic column names and the number of their occurrences. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-01-15 10:34 | MIT License | |
733 | The longest names of database objects | Find the TOP 3 longest (identifiers) names of user-defined objects. | General | INFORMATION_SCHEMA+system catalog base tables | 2023-03-18 17:22 | MIT License | |
734 | The number of columns based on table type | Find the total number of columns in the different types of tables as well as average number of columns in the tables as well as minimal and maximal number of columns. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2022-11-10 14:12 | MIT License | |
735 | The number of default values | Find the total number of columns with a default value as well as the number of columns with different kinds of default values (the number of columns where the default is used to implement surrogate key, the number of columns where the default is not used to implement surrogate key, the number of columns with a static default value, the number of columns with a dynamic default value). | Sofware measure | INFORMATION_SCHEMA only | 2021-11-22 13:26 | MIT License | |
736 | Incorrect check of NULLs | Find the use of =NULL and <>NULL in case of table level check constraints, domain level check constraints, WHEN clauses of triggers, WHERE clauses of rules, subqueries of derived tables, and bodies of routines. Write correct code. In order to determine as to whether a value is missing or not one has to use the IS [NOT] NULL predicate. NULL is the marker in SQL that denotes a missing value. Although it is often called "NULL value", one cannot treat it as an ordinary value, i.e., use it in comparisons as a value. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-12 12:10 | MIT License | |
737 | Incorrect specification of logical or in regular expressions | Find the use of regular expressions where logical or is incorrectly specified, i.e., (| or |). | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-24 12:07 | MIT License | |
738 | The same trigger function is used in case of multiple tables | Find trigger functions that are used in case of more than one table. Although it is legal, one must be careful when changing the functions in order to avoid unwanted consequences. | General | INFORMATION_SCHEMA only | 2020-12-25 14:50 | MIT License | |
739 | Trigger functions with a conditional statement | Find trigger functions that contain a conditional (IF or CASE) but do not contain a SELECT statement before these. The latter condition is for the reason that one cannot use a subquery in the WHEN clause. Thus, if one wants to make a query and decide the further action based on the results of the query, then one must do it within the body of the function. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-11-19 12:07 | MIT License | |
740 | Triggers with the same name in different schemas | Find trigger names that are used in a database in more than one schema. Different things should have different names. But here different triggers have the same name. Also make sure that this is not a duplication. | General | INFORMATION_SCHEMA+system catalog base tables | 2020-11-06 14:51 | MIT License |