| # | Name | Goal | Type | Data source ▲ | Last update | License | |
|---|---|---|---|---|---|---|---|
| 941 | Foreign keys with ON UPDATE CASCADE | This query generates a list of all foreign key constraints that are defined with the ON UPDATE CASCADE action. This list must be manually audited to enforce the design principle that this action should be applied exclusively to relationships involving mutable, natural keys. Any instance found referencing an immutable surrogate key should be considered a design flaw and remediated. | General | system catalog base tables only | 2025-11-08 10:40 | MIT License | View |
| 942 | Function Upper or Lower is used in an index on a non-textual column | Find function-based indexes that are based on function Upper or Lower but have been defined on a non-textual column. Such indexes support case insensitive search but in case of non-textual columns this does not have a meaning. | Problem detection | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 943 | Grantable privileges on the database and its schemas, domains, types, languages, sequences, foreign data wrappers, and foreign servers | Find privileges on the database and its schemas, domains, types, languages, sequences, foreign data wrappers, and foreign servers that the carrier of the privilege can in turn grant to others, i.e., the privileges have been given WITH GRANT OPTION. The number of privileges that can be passed on should be as small as possible. | Problem detection | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 944 | Grantable roles | Find roles that a member can grant to others, i.e., the role has been granted with ADMIN OPTION. The number of privileges that can be passed on should be as small as possible. | Problem detection | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 945 | Granted roles | Find membership relations between roles. | General | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 946 | Gratuitous context in the names of foreign key columns | Find foreign key columns that name contains twice the name of the referenced (primary) table. | Problem detection | system catalog base tables only | 2025-11-07 10:12 | MIT License | View |
| 947 | Gratuitous context in the names of schema objects | This query identifies schema objects with names that are redundantly prefixed with their own schema's name. It flags any object whose name begins with the schema name plus at least one other character. This enforces the design principle that a schema is a sufficient namespace, and therefore, objects within it do not require the additional, repetitive context in their own names. | Problem detection | system catalog base tables only | 2025-11-07 10:12 | MIT License | View |
| 948 | Identical indexes | Find indexes that are identical, i.e., have the same properties, including uniqueness. The query considers all types of indexes, including indexes that have been automatically created to support a constraint and function-based indexes. | Problem detection | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 949 | Inconsistency (code vs. id) of naming foreign key and referenced candidate key columns | Naming of foreign key and referenced candidate key columns should be consistent. It cannot be so that in one table a value is labeled "id" like some surrogate key value and in another it "turns" into human-usable "code" or vice versa. An example: Person(person_id, name) Primary Key (person_id) E_mail_address(e_mail_address_id, person_code, address) Primary Key (e_mail_address_id) Foreign key (person_code) References Person (person_id) |
Problem detection | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 950 | Inconsistent chain of relationships in terms of using ON UPDATE compensating action | In case of a chain of relationships between tables (where the primary key and the foreign key have the same columns) the use of ON UPDATE compensating action should be consistent. For instance, in the next example there is inconsistency, because if one changes the person_code in table Person, then the modification does not succeed because it does not cascade to the table Product. It is unclear as to whether it should be possible to change the person_code or not. Person (person_code, surname) Primary key (person_code) Worker(person_code) Primary key (person_code) Foreign key (person_code) References Person (person_code) ON UPDATE CASCADE Product(product_code, registrator) Primary key (product_code) Foreign key (registrator) References Worker (person_code) ON UPDATE NO ACTION |
Problem detection | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 951 | Inconsistent two-column CHECK constraints | This query identifies inconsistencies in two-column CHECK constraints across the database. Specifically, it flags cases where different tables share the exact same pair of columns, but the logical expressions governing them differ. For example, one table might enforce last_change_time >= reg_time, while another strictly enforces last_change_time > reg_time. Highlighting these discrepancies helps ensure uniform data validation rules. | Problem detection | system catalog base tables only | 2026-05-26 07:04 | MIT License | View |
| 952 | Index FILLFACTOR is not default | This query generates a list of all indexes with an explicitly configured, non-default FILLFACTOR for the purpose of a performance audit. The query is aware of the different default FILLFACTOR values associated with various index access methods (e.g., 90 for B-tree, 100 for others like GiST/GIN). This allows administrators to quickly identify and review all instances of customized index storage parameters to assess if these non-standard configurations are justified and still effective. | General | system catalog base tables only | 2025-11-10 09:17 | MIT License | View |
| 953 | Installed extensions | Try to use as much the possibilities of the DBMS as possible. On the other hand, do not install extensions that are not needed in order not to overcomplicate the database. | General | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 954 | Many-to-many tables that need conceptual renaming | This query identifies junction tables (implementing a binary relationship via two foreign keys) whose names are simple concatenations of the parent table names (e.g., Course_Lecturer). This naming style is flagged as a design smell because it merely describes the physical implementation rather than the conceptual relationship being modeled. The recommended best practice is to rename such tables to reflect the domain concept they represent. For instance, the relationship between Course and Lecturer should be named after the activity it represents, such as Teaching or Course_Assignment. | Problem detection | system catalog base tables only | 2025-11-15 09:45 | MIT License | View |
| 955 | Many-to-many tables that perhaps need conceptual renaming | This query identifies junction tables (implementing a binary relationship via two foreign keys) whose names are simple concatenations of the parent table names, often with minor variations (e.g., Courses_Lecturer). This naming convention is a design smell as it describes the physical implementation rather than the conceptual relationship being modeled. The recommended best practice is to rename such tables to reflect the domain concept they represent. For instance, the relationship between Course and Lecturer should be named after the activity it represents, such as Teaching or Course_Assignment. | Problem detection | system catalog base tables only | 2025-11-15 09:46 | MIT License | View |
| 956 | More than one index on a column | Find base table columns that belong to more than one index (including automatically created indexes that support constraints). | General | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 957 | Multiple inheritance | Find instances of multiple inheriance of base tables. Make sure that multiple inheritance is indeed needed. | General | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 958 | Multiple triggers that update tsvector values | Find base tables that have multiple triggers to update tsvector values. | Problem detection | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |
| 959 | Name-based foreign key relationships | This query identifies foreign key relationships that are established using name columns rather than standard identifiers. In a well-designed database, relationships should be built upon stable natural keys (such as codes) or system-generated surrogate keys, rather than mutable textual names. | Problem detection | system catalog base tables only | 2026-05-23 11:51 | MIT License | View |
| 960 | Names of columns that hold personal names but do not take into account cultural diversity | Find columns of tables (base tables, views, materialized views, foreign tables) that have the name first_name or last_name. Such column names do not take into account that different cultures use different personal name components and the number of possible components is more than two. If in a culture, the surname is presented before the given name, then the column names causes confusion. | Problem detection | system catalog base tables only | 2025-11-07 10:11 | MIT License | View |