Seq nr | Name | Goal | Type | Data source | Last update▼ | License | ... |
---|---|---|---|---|---|---|---|
21 | Perhaps IS DISTINCT FROM should be used instead of <> in WHEN clauses | Use a right predicate in trigger condition in order to ensure that the trigger executes always when it has to but not more often. IS DISTINCT FROM treats NULL as if it was a known value, rather than unknown. It would be relevant if a column that is referenced in the action condition is optional, i.e., permits NULLs. | General | INFORMATION_SCHEMA only | 2024-12-23 12:27 | MIT License | |
22 | Non-foreign key indexes that have been named as foreign key indexes | Find indexes that are not on a foreign key column but the name of the index contains ixfk or idxfk. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-23 12:12 | MIT License | |
23 | Perhaps updating of modification time is missing | Find routines with SQL-standard body that seem to update data in a table that has a column for modification time but the routine does not seem to update the modification time while updating the row and the table does not seem to have an UPDATE trigger that changes the modification time. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-23 11:55 | MIT License | |
24 | UPDATE triggers where WHEN clause has not been specified (the trigger could executed too often) | Find UPDATE triggers where WHEN clause is not specified. These triggers could be executed too often because unneeded executions are not prevented. | Problem detection | INFORMATION_SCHEMA only | 2024-12-23 09:54 | MIT License | |
25 | UPDATE triggers where updated columns have not been specified (the trigger could executed too often) | Find UPDATE triggers where updated columns are not specified. These triggers could be executed too often because unneeded executions are not prevented. | Problem detection | INFORMATION_SCHEMA only | 2024-12-23 09:53 | MIT License | |
26 | Perhaps is not snake_case - id, code, key, or nr is not preceded by an underscore | Find names that perhaps do not use the snake_case naming style because the name ends with the phrase "id", "uuid", "code", "kood", "key", or "nr" that is not preceded by an underscore. Prefer snake_case over PascalCase and camelCase in names. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-23 09:26 | MIT License | |
27 | 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 | 2024-12-22 14:53 | MIT License | |
28 | Duplicate comments | Find comments that have been registered with a COMMENT statement and that are associated with more than one object. It would probably mean that a comment is incorrect or missing. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:31 | MIT License | |
29 | Gratuitous context in the names of schema objects | Find schema objects that name starts with the schema name and then has at least one more symbol. "Shorter names are generally better than longer ones, so long as they are clear. Add no more context to a name than is necessary" (Robert C. Martin, Clean Code) Shema is a namespace. There cannot be in the same schema two schema objects that belong to the same name class and have the same name. | Problem detection | system catalog base tables only | 2024-12-21 17:30 | MIT License | |
30 | Names of database objects that are fully uppercase | Full uppercase means screaming and it makes comprehending the names more difficult. Find the names (identifiers) of user-defined database objects that are fully uppercase. Because PostgreSQL stores regular identifiers lowercase in the system catalog it also means that these are delimited identifiers, i.e., these are case sensitive. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:27 | MIT License | |
31 | Names of database objects with four or more consecutive identical symbols | Find names of database objects with four or more consecutive identical symbols | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:27 | MIT License | |
32 | Too short names of database objects | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) The names should be meaningful and searchable. Find the names (identifiers) of user-defined database objects that are shorter than three characters. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:27 | MIT License | |
33 | The longest names of database objects | Find the TOP 3 longest (identifiers) names of user-defined objects. | General | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:26 | MIT License | |
34 | The number and percentage of different names of database objects | Names should be expressive. Find the number of different names used in a database as well as the number of named database objects, and the percentage of different names from all the names. Names should be expressive. Different objects should have different names. The smaller the percentage the less descriptive are the names in the database. Find the number of different names (identifiers) of user-defined database objects and compare it with the total number of database objects. The values could be used to compare different databases. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:26 | MIT License | |
35 | Median and average of the length of names of database objects | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the median length and average (arithmetic mean) length of the names (identifiers) of user-defined database objects. The values could be used to compare different databases. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:25 | MIT License | |
36 | The number of names of database objects by the number of subcomponents in the names | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the number of names (identifiers) of user-defined database objects by the number of subcomponents in the names. The values could be used to compare different databases. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:25 | MIT License | |
37 | Frequent names of database objects by object type | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the names (identifiers) of user-defined database objects that occur at least twice as frequently as a name occurs in average in case of the particular type of database objects. Also make sure that there is no duplication in play. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:24 | MIT License | |
38 | The shortest names of database objects by object type | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find the shortest (identifiers) names of user-defined objects by their type. These could be the first candidates of renaming in order to give to database objects better names. | General | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:24 | MIT License | |
39 | Names of database objects that are used to manage the state of main objects in the database | "Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) The naming must be consistent. One should avoid mixing synonyms like "seisund", "staatus", and "olek" in Estonian or "state" and "status" in English and stick with one term. | General | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:23 | MIT License | |
40 | Names of database objects that start with an underscore | Improve the readability of names. Find the names (identifiers) of user-defined database objects that start with an underscore. This is not necessarily a mistake. For instance, parameter names could start with an underscore. On the other hand, it could be that the prefix is missing in the name. | General | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:23 | MIT License |