Catalog of PostgreSQL queries for finding information about a PostgreSQL database and its design problems

AND
AND
AND
ANDFrom where does the query gets its information?
AND
AND

There are 961 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
841Duplicate foreign key constraintsFind duplicate foreign key constraints, which involve the same columns and refer to the same set of columns.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
842Duplicate independent (i.e., not created based on a table) composite typesFind composite types with the same attributes (regardless of the order of attributes). Make sure that there is no duplication.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
843Duplicate keysFind completely overlapping key (primary key and unique) constraints. This is a form of duplication. It leads to the creation of multiple indexes to the same set of columns.Problem detectionsystem catalog base tables only2021-10-16 10:27MIT License
844Duplicate materialized viewsFind materialized views with exactly the same subquery. There should not be multiple materialized views with the same subquery. Do remember that the same task can be solved in SQL usually in multiple different ways. Thus, the exact copies are not the only possible duplication.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
845Duplicate non-fuction based unique indexesFind pairs of non-function based unique indexes that cover the same set of columns. Include indexes that support a constraint (primary key, unique, exclude), i.e., these indexes have been automatically created due to the constraint declaration. For instance, it helps us to find unique indexes that have been defined to already unique columns.Problem detectionsystem catalog base tables only2022-10-21 10:17MIT License
846Duplicate rulesFind multiple rules with the same definition (event, condition, action) on the same table. Do remember that the same task can be solved in SQL usually in multiple different ways. Thus, the exact copies are not the only possible duplication.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
847Empty tablesFind base tables where the number of rows is zero. If there are no rows in a table, then it may mean that one hasn't tested constraints that have been declared to the table or implemented by using triggers. It could also mean that the table is not needed because there is no data that should be registered in the table.Problem detectionsystem catalog base tables only2022-10-21 15:55MIT License
848Excessive privileges on databases, schemas, domains, types, languages, foreign data wrappers, and foreign serversFind excessive privileges on databases, schemas, domains, collations, sequences, foreign data wrappers, and foreign servers that are probably not needed by a typical application.Problem detectionsystem catalog base tables only2021-12-31 14:40MIT License
849Exclude constraint instead of simple UNIQUEFind exclude constraints that implement a simple UNIQUE constraint. The checking might be slower compared to UNIQUE constraint.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
850Extension routinesFind all routines that belong to an extension.Generalsystem catalog base tables only2020-11-06 14:51MIT License
851Extension routines in the schema "public"Find extensions that routines are in the schema public.Generalsystem catalog base tables only2024-01-04 11:56MIT License
852Extensions that are available but are not installedTry 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.Generalsystem catalog base tables only2020-11-06 14:51MIT License
853Foreign key column has a simple check constraint that is attached directly to the tableFind 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 detectionsystem catalog base tables only2021-02-25 17:29MIT License
854Foreign key constraint references to the columns of a UNIQUE constraint not to the columns of the PRIMARY KEY constraintFind 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 detectionsystem catalog base tables only2021-02-25 17:30MIT License
855Foreign 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 keyFind 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 detectionsystem catalog base tables only2021-02-25 17:30MIT License
856Foreign key references to a unique index columns not a unique key columnsFind foreign key constraints that reference to the columns that are covered by a unique index not a unique key.Problem detectionsystem catalog base tables only2022-10-21 10:30MIT License
857Foreign key refers to a table that has at least one subtable in the inheritance hierarchyFind foreign key constraints that refer to a base table that has at least one subtable in the inheritance hierarchy. Rows of the subtable do not belong to the supertable in terms of checking the referential integrity. Let us assume that there is a table T with a subtable Tsub. Let us also assume that table B has a foreign key that refers to the table T. If a row is inserted into Tsub, then this row cannot be referenced from B.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
858Foreign keys with ON DELETE CASCADEFind referential constraints (foreign key constraints) that employ ON DELETE CASCADE compensatory action. ON DELETE CASCADE should only be used if it has been created based on a generalization or a composition in the conceptual data model or if the foreign key connects a table that corresponds to the main entity type with a table that corresponds to a non-main entity type.Generalsystem catalog base tables only2020-11-16 10:15MIT License
859Foreign keys with ON UPDATE CASCADEReferential constraints (foreign key constraints) that employ ON UPDATE CASCADE compensatory action. ON UPDATE CASCADE should only be used if the referenced key is a natural key (its values can be changed).Generalsystem catalog base tables only2020-11-15 15:39MIT License
860Function Upper or Lower is used in an index on a non-textual columnFind 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 detectionsystem catalog base tables only2021-02-25 17:30MIT License