Seq nr | Name | Goal▲ | Type | Data source | Last update | License | ... |
---|---|---|---|---|---|---|---|
441 | ON UPDATE CASCADE is probably missing (based on data types) | Find foreign key constraints where the foreign key column does not have an integer type or uuid type and the foreign key constraint does not have ON UPDATE CASCADE compensating action. In this case the foreign key probably refferes to a natural key (i.e., a key that values have meaning outside the computer system) and ON UPDATE CASCADE would be suitable because the key values could be changed over time. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-10-06 14:19 | MIT License | |
442 | ON DELETE CASCADE is not needed (based on classifier tables) | Find foreign key constraints with ON DELETE CASCADE compensating action that refer to classifier (reference data) tables. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2023-12-08 14:52 | MIT License | |
443 | Composite foreign keys | Find foreign keys that consist of more than one column. Make sure that the order of columns in the composite foreign key corresponds to the order of columns in the composite candidate key in the referenced table. | General | system catalog base tables only | 2020-11-06 14:51 | MIT License | |
444 | Column names that make joining tables more difficult (quite similar names) | Find foreign keys where the name of the foreign key column and the corresponding primary key/unique column is different and the difference is between two and four characters. Exclude foreign key columns that refer to the key of the same table because within each named table column names must be different. Simplify writing queries that have to join data from multiple base tables. If the columns that participate in the join condition have the same name, then one can use the USING syntax. | Problem detection | system catalog base tables only | 2023-11-08 13:56 | MIT License | |
445 | Column names that make joining tables more difficult (very similar names) | Find foreign keys where the name of the foreign key column and the corresponding primary key/unique column is different and the difference is one character. Exclude foreign key columns that refer to the key of the same table because within each named table column names must be different. Simplify writing queries that have to join data from multiple base tables. If the columns that participate in the join condition have the same name, then one can use the USING syntax. | Problem detection | system catalog base tables only | 2023-11-08 13:56 | MIT License | |
446 | Column names that make joining more difficult (foreign key column name contains the table name) | Find foreign keys where the name of the foreign key column and the corresponding primary key/unique column is different but the difference comes from the fact that the foreign key column name starts or ends with the table name. Simplify writing queries that have to join data from multiple base tables. If the columns that participate in the join condition have the same name, then one can use the USING syntax. | Problem detection | system catalog base tables only | 2023-11-12 10:26 | MIT License | |
447 | Column names that make joining tables more difficult | Find foreign keys where the name of the foreign key column and the corresponding primary key/unique column is different. Exclude foreign key columns that refer to the key of the same table because within each named table column names must be different. Simplify writing queries that have to join data from multiple base tables. If the columns that participate in the join condition have the same name, then one can use the USING syntax. | Problem detection | system catalog base tables only | 2023-11-08 13:56 | MIT License | |
448 | SET DEFAULT compensatory action is unsuitable | Find foreign keys with SET DEFAULT compensatory action where the foreign key column does not have a default value. Compensatory actions cannot make changes that violate integrity constraints in a database. SET DEFAULT means that there shoud be a default value at the foreign key column. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:30 | MIT License | |
449 | Unused foreign servers | Find foreign servers that do not have any associated foreign tables. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
450 | Foreign servers without user mappings | Find foreign servers that do not have any associated user mappings. "A user mapping typically encapsulates connection information that a foreign-data wrapper uses together with the information encapsulated by a foreign server to access an external data resource." | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-02-25 17:29 | MIT License | |
451 | Updataple foreign tables that refer to another PostgreSQL table | Find foreign tables that have been defined based on postgresql_fwd foreign data wrapper and that are updatable. Make sure that updatability is in this case needed. | General | INFORMATION_SCHEMA only | 2020-11-06 17:15 | MIT License | |
452 | 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 | 2021-02-25 17:30 | MIT License | |
453 | Functions that have transactional control | Find functions that contain transactional control statements (BEGIN, START TRANSACTION, COMMIT, ROLLBACK, SAVEPOINT) in their body. PostgreSQL does not permit transaction control in functions. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2021-11-04 10:50 | MIT License | |
454 | Generated stored base table columns that expression does not refer to any column | Find generated stored base table columns that expression does not refer to any column of the table. It could be that there will be a constant value in every row in case of this column. The support of generated columns was added to PostgreSQL 12. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:29 | MIT License | |
455 | Generated stored base table columns duplicates another column in the table | Find generated stored columns in PostgreSQL base tables that duplicate other columns in the table. | Problem detection | INFORMATION_SCHEMA only | 2021-02-25 17:30 | MIT License | |
456 | Generated stored base table columns | Find generated stored columns in PostgreSQL base tables. The support of generated columns was added to PostgreSQL 12. These could be used to improve the performance of queries. | General | INFORMATION_SCHEMA only | 2020-11-06 14:51 | MIT License | |
457 | Referential degree of tables (ver 2) | Find how many base tables are referenced from a base table by using foreign keys. | Sofware measure | system catalog base tables only | 2021-03-12 11:06 | MIT License | |
458 | The number of referencing base tables | Find how many base tables reference to a base table by using foreign keys. The more references there are the more impact the change of the table could have to the overall system. | Sofware measure | system catalog base tables only | 2021-03-12 11:02 | MIT License | |
459 | The number of tables based on the number of columns | Find how many tables with a certain range of the number of columns there are in the database. | Sofware measure | INFORMATION_SCHEMA+system catalog base tables | 2021-03-25 11:17 | MIT License | |
460 | Identifiers that explicitly say that they carry no meaning | Find identifiers that explicitly say that they carry no meaning. Such identifier is called "unnamed" or "anonymous". | Problem detection | INFORMATION_SCHEMA+system catalog base tables | 2024-12-21 17:15 | MIT License |