| 501 |
Excessive privileges on databases, schemas, domains, types, languages, foreign data wrappers, and foreign servers |
Find excessive privileges on databases, schemas, domains, collations, sequences, foreign data wrappers, and foreign servers that are probably not needed by a typical application. |
Problem detection |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 502 |
Exclude constraint instead of simple UNIQUE |
Find exclude constraints that implement a simple UNIQUE constraint. The checking might be slower compared to UNIQUE constraint. |
Problem detection |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 503 |
Exclude constraint to prevent overlapping time periods |
Find exclude constraints on base tables with multiple date/timestamp columns that prevent overlapping time periods. |
General |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 504 |
Extension routines |
Find all routines that belong to an extension. |
General |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 505 |
Extension routines in the schema "public" |
Find extensions that routines are in the schema public. |
Problem detection |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 506 |
Extension routines that execution privilege has been granted to PUBLIC |
Know the privileges that users have in your system. Probably all the database users do not need these privileges. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 507 |
Extensions that are available but are not installed |
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 |
| 508 |
Extreme contraction |
Find names that contain extremely short terms, due to an excessive word contraction, abbreviation, or acronym usage. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 509 |
Field size is not sufficiently different in case of base table columns |
Find base table columns that name refers to the possibility that these are used to register names. Find base table columns that name refers to the possibility that these are used to register comments/descriptions/etc. Find the cases where a base table contains columns from the both sets and the field size in case of the latter is not at least twice as big as in case of the former. For example, if the name of a service can be 100 character long, then it is quite illogical that the description of the service is only at most 200 characters long. |
Problem detection |
INFORMATION_SCHEMA only |
2025-11-07 10:11 |
MIT License |
View |
| 510 |
Find all non-foreign key columns of base tables |
Find all non-foreign key columns of base tables. Make sure that no foreign key constraint is missing. |
General |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 511 |
Find all publications |
Find publications of tables that have been created in order to enable logical replication. |
General |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 512 |
Flag parameters |
A Boolean parameter may be used to determine what task to fulfill. In this case the routine has multiple tasks and does not satisfy the separation of concerns principle. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 513 |
Foreign key column has a default value that is not present in the parent table |
Find foreign key columns that have a default value that is not present in the parent table. Identify default values that cause violations of the referential constraints. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 514 |
Foreign key column has a simple check constraint that is attached directly to the table |
Find foreign key columns that are covered by a simple check constraint, i.e., the constraint involves only one column. Look only constraints that are directly associated with the table, i.e., are not specified through a domain. Perhaps the constraint should be defined on the referenced candidate key column. |
Problem detection |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 515 |
Foreign key columns that are associated with a sequence generator |
Find foreign key columns that are associated with a sequence generator. Foreign key values are selected amongst the values that are registered as corresponding primary key/unique key values. Values in the foreign key columns are not directly generated by the system. These values might be system generated indirectly - generated when a row is added to the primary (parent) table. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 516 |
Foreign key columns that do not have an integer or varchar type |
Find foreign key columns that do not have smallint, integer, bigint, or varchar(n) type. These are the most commonly used types in case of key/foreign key columns. Although the use of other types would be perfectly legal as well, make sure that you have selected the best possible data type for each and every column. |
General |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 517 |
Foreign key columns that have no index |
Find foreign key columns that do not have an index. Foreign key columns are often used for performing join operations. It is useful to index such columns. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |
| 518 |
Foreign key constraint references to the columns of a UNIQUE constraint not to the columns of the PRIMARY KEY constraint |
Find foreign key constraints that reference to a UNIQUE constraint columns not to the PRIMARY KEY constraint columns. This is legal in SQL. However, a tradition is to refer to the primary key columns. If most of the foreign keys refer to the primary key columns, then it raises a question as to whether this kind of design decision has a good reason in a particular case or whether it is an inconsistency. |
Problem detection |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 519 |
Foreign key constraint references to the columns of a UNIQUE constraint not to the columns of the PRIMARY KEY constraint while the referenced table has the primary key |
Find foreign key constraints that reference to a UNIQUE constraint columns not to the PRIMARY KEY constraint columns while at the same time the referenced table does have the primary key. This is legal in SQL. However, a tradition is to refer to the primary key columns. If most of the foreign keys refer to the primary key columns, then it raises a question as to whether this kind of design decision has a good reason in a particular case or whether it is an inconsistency. |
Problem detection |
system catalog base tables only |
2025-11-07 10:11 |
MIT License |
View |
| 520 |
Foreign key references a non-key (has optional columns) |
Find foreign key constraints that referenced column is optional. |
Problem detection |
INFORMATION_SCHEMA+system catalog base tables |
2025-11-07 10:11 |
MIT License |
View |