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...
381Duplicate commentsFind 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 detectionINFORMATION_SCHEMA+system catalog base tables2023-03-16 20:33MIT License
382Duplicate DEFAULT values of base table columnsFind base table columns that have both default value determined through a domain and default value that is directly attached to the column. Do not duplicate specifications of default values to avoid confusion and surprises. If column and domain both have a default value, then in case of inserting data the default value that is associated directly with the column is used.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
383Duplicate domainsFind domains that have the same properties (base type, character length, not null + check constraints, default value). There should not be multiple domains that have the same properties. Do remember that the same task can be solved in SQL usually in multiple different ways. Therefore, the domains may have syntactically different check constraints that solve the same task. Thus, the exact copies are not the only possible duplication.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
384Duplicate enumerated typesFind enumerated types with exactly the same values. There should not be multiple types that have the same values.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
385Duplicate 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
386Duplicate 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
387Duplicate 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
388Duplicate 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
389Duplicate 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
390Duplicate NOT NULL constraintsFind columns that have NOT NULL constraint through a domain and also directly. Do not duplicate NOT NULL constraints in orde to avoid confusion and surprises.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
391Duplicate removal of duplicates in derived tablesFind derived tables (views and materialized views) that contain both DISTINCT and GROUP BY. Make sure that the means for removing duplicate rows from the query result are not duplicated.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
392Duplicate 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
393Duplicate specification of character classesFind regular expressions where within the same specification of a character class the character class alnum as well as 0-9, \d, A-Z, or a-z has been defined.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-24 10:43MIT License
394Duplicate stored generated base table columnsFind base tables that have more than one stored generated column with the same expression. The support of generated columns was added to PostgreSQL 12. 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 detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
395Duplicate triggersFind cases where the same table has multiple triggers with the same type (row-level, statement-level) that react to the same event with the same WHEN condition and with the same way (by invoking the same function).Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
396Duplicate user-defined routinesFind user-defined routines with the exact duplicate body and parameters. There should not be multiple routines with exactly the same body and parameters (name, type). Having such duplicates is redundancy. Do remember that the same task can usually be solved in multiple different ways. Thus, the exact copies of routine bodies are not the only possible duplication. Moreover, it could be that different routines that solve the same task have different parameter names (but the parameters have the same types, ordinal positions, default values or the routines have different order of parameters). Thus, the query does not find all the duplications.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-05 11:59MIT License
397Duplicate viewsFind views with exactly the same subquery. There should not be multiple views with exactly 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 detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
398Duplication of case insensitivity specification in a regular expressionFind regular expressions that use both case insensitive search operator ~* and case insensitivity modifier (?i).Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 12:49MIT License
399Duplication of parent table CHECK constraints on the foreign key columnsFind duplicate constraints, which make it more difficult to maintain the constraints. 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 detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
400Duplication of simple CHECK constraints on the same columnFind duplication of simple CHECK constraints on the same base table or foreign table column. Duplication of the same constraint means that if one starts to manage the code, then changes have to be made in multiple places. The problem is essentially similar with the data redundancy problem that database normalization tries to reduce. 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 detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License