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...
81Column name contains the table nameFind columns that have the same name as the table. The names may have different uppercase/lowercase characters. Make sure that the naming style is consistent.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-06 12:38MIT License
82Column name is the same as the table nameFind columns that have the same name as the table. The names may have different uppercase/lowercase characters. Sometimes columns with such names are used as the key columns. Make sure that the naming style is consistent.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-06 12:38MIT License
83Columns defined in a subtableFind columns that have been added to a subtable, i.e., these were not defined in its immediate supertable.GeneralINFORMATION_SCHEMA+system catalog base tables2021-01-02 03:22MIT License
84Columns for registration and update timesFind base table columns that based on the names and data types are meant for registering registration time or update time. Make sure that the columns have the same properties.GeneralINFORMATION_SCHEMA only2023-11-26 16:51MIT License
85Columns with array or user-defined typeFind columns with an array or a user-defined type. Each columns should have the most appropriate data type.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-19 17:04MIT License
86Columns with BOOLEAN type that do have a good nameThe prefic of the name should be "is_" or "has_" or "can_" (in English) or "on_" (in Estonian). Worse: agreed, kinnitatud. Better: is_agreement, on_kinnitatud.GeneralINFORMATION_SCHEMA+system catalog base tables2024-01-03 09:56MIT License
87Columns with BYTEA or OID typeFind columns with BYTEA or OID type. These columns are potentially meant for storing large objects. Each columns should have the most appropriate data type.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-19 17:00MIT License
88Columns with JSON, JSONB, or XML typeFind columns with JSON, JSONB, or XML type. Each columns should have the most appropriate data type.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-19 17:01MIT License
89Columns with tsvector typeFind columns of base tables and materialized views that have tsvector type.GeneralINFORMATION_SCHEMA+system catalog base tables2023-12-22 12:41MIT License
90Comments of columnsFind all comments of columns of tables.Generalsystem catalog base tables only2023-10-18 14:09MIT License
91Comments of derived tablesFind comments of derived tables (views and materialized views) that are registered in the system catalog witht a COMMENT statement. Find also comments on their associated objects (columns, triggers, rules). Make sure that the comments give relevant, useful, and correct information.Generalsystem catalog base tables only2023-01-19 12:14MIT License
92Comments of non-derived tablesFind comments of non-derived tables (base tables, foreign tables, and partitioned tables) that are registered in the system catalog witht a COMMENT statement. Find also comments on their associated objects (columns, constraints, indexes, triggers, rules). Make sure that the comments give relevant, useful, and correct information.Generalsystem catalog base tables only2023-01-19 12:30MIT License
93Comments of routinesFind comments of user-defined routines (functions or procedures) that are registered in the system catalog witht a COMMENT statement. Make sure that the comments give relevant, useful, and correct information.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
94Comments of schemas, sequences, types, domains, domain constraints, and event triggersFind all the comments that have been added with a COMMENT statement to schemas, sequences, types, domains, and event triggers.Generalsystem catalog base tables only2023-01-19 15:04MIT License
95Composite foreign keysFind 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.Generalsystem catalog base tables only2020-11-06 14:51MIT License
96Consistency of CHECK constraint name and contentFind all CHECK constraints that name contains a digit. Make sure that the name and the Boolean expression are consistent.GeneralINFORMATION_SCHEMA only2021-12-10 13:21MIT License
97Consistency of comments of routinesFind user-defined routines that have a comment registered by the COMMENT statement and a comment within the routine body. Make sure that there are no inconsistencies between the comments.GeneralINFORMATION_SCHEMA+system catalog base tables2021-11-04 10:56MIT License
98Consistency of using generic column names in candidate key columns that are not foreign key columnsFind the names on base table columns that are a part of a candidate key but not a foreign key and contain a generic word (nimi, nimetus, kommentaar, kirjeldus, name, comment, description, etc.). Make sure that naming of these is consistent, i.e., such names always contain the table name or never contain the table name.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 20:53MIT License
99Consistency of using generic column names in non-candidate key columns that are also not foreign key columnsFind the names on base table columns that are not a part of a candidate key and a foreign key and contain a generic word (nimi, nimetus, kommentaar, kirjeldus, name, comment, description, etc.). Make sure that naming of these is consistent, i.e., such names always contain the table name or never contain the table name.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 20:53MIT License
100Constraints that are not redefined in a subtable but there is a CHECK constraint that compensates thisFind primary key, unique, foreign key, and exclude constraints that have been defined in a supertable (parent table) but not in its subtable. Exclude constraints where in case of the subtable there is a CHECK that permits only one specific value in the constraint column. The presence of such check would make the design acceptable. Unfortunately, PostgreSQL table inheritance is implemented in a manner that some constraints (CHECK, NOT NULL) are inherited from the supertable but others are not. "All check constraints and not-null constraints on a parent table are automatically inherited by its children, unless explicitly specified otherwise with NO INHERIT clauses. Other types of constraints (unique, primary key, and foreign key constraints) are not inherited." (PostgreSQL documentation)GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-25 16:20MIT License