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...
161Columns of base tables that hold truth values that do not have a default value although they could have it (non-Boolean columns)Find columns of base tables that do not have type BOOLEAN but are used to record Boolean values. Based on column names these implement a state machine or record agreements. At the same time the columns do not have a default value. There are only two truth values - TRUE and FALSE - in case of two-valued logic. It should be possible to select one of these as the default value of the column.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-09 16:40MIT License
162Columns of base tables with data about postal addresses, file addresses, or web addresses that have an incorrect data typeFind base table columns that name refers to the possibility that these are used to register file/web addresses. Find the columns where the type refers to the possibility that values in the column are actual files.Problem detectionINFORMATION_SCHEMA only2021-03-27 13:46MIT License
163Columns of derived tables that name has been given by the systemFind columns of derived tables (i.e., views and materialized views) where in the creation statement of the table the name of the column has not been specified, i.e., it is generated by the system.Problem detectionsystem catalog base tables only2023-12-21 12:15MIT License
164Columns of derived tables that name has been given by the system (2)Find columns of derived tables (i.e., views and materialized views) where in the creation statement of the table the name of the column has not been specified, i.e., it is generated by the system.Problem detectionsystem catalog base tables only2023-12-21 12:17MIT License
165Columns that have the same name as some domain/typeUse different names to avoid confusion.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-28 14:47MIT License
166Columns that have the same name as their domain/typeFind the columns that name is the same as the name of the type of the column or the domain of the column.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-30 13:04MIT License
167Columns 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
168Columns 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
169Columns with BOOLEAN type that do not have a good nameThe phrase "is_" or "has_" or "can_" (in English) or "on_" (in Estonian) should be used in the name - preferably in the beginning. Worse: agreed, kinnitatud. Better: contract_is_agreed, leping_on_kinnitatud. Perhaps the best: is_contract_agreed or is_agreement, on_leping_kinnitatud, on_kinnitatud.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-03 09:56MIT License
170Columns 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
171Columns with exact/floating numeric types have textual default valuesThe default value of a column should belong to the type of the column. The system shouldn't conduct unnecessary type casts.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
172Columns 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
173Columns with only one valueFind base table columns that contain only one value. Perhaps it is an unnecessary column. Having only one value is most likely inadequate for testing.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
174Columns 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
175Comments of columnsFind all comments of columns of tables.Generalsystem catalog base tables only2023-10-18 14:09MIT License
176Comments 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
177Comments 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
178Comments 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
179Comments 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
180Completely overlapping foreign keysFind completely overlapping foreign keys, i.e., the same set of columns of a table is covered by more than one foreign key constraint. These constraints could refer to the same table/key or different tables/keys.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License