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...
141CHECK constraint with pattern matching on non-textual columnsFind base table and foreign table columns that do not have a textual type but have a single-column check constraint that uses pattern matching. The use of a regular expression, a LIKE clause, or a SIMILAR TO clause in order to constrain values in a non-textual column points to the incorrect selection of operator or column data type.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
142BOOLEAN base table and foreign table columns with a CHECK constraint that involves olnly this columnFind base table and foreign table columns with the Boolean type that has a CHECK constraint that involves only this column. Avoid unnecessary CHECK constraints. The Boolean type contains only two values and there is nothing to check. By creating a check that determines that possible values in the column are TRUE and FALSE, one duplicates the attribute constraint (column has a type). This is a form of duplication.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
143Table constraints with the same name (constraints connected directly with a base table or a foreign table)Find base table and foreign table constraint names that are used in a database more than once (possibly in different schemas or in case of different types of constraints). Different things should have different names. But here different constraints have the same name. Also make sure that this is not a sign of duplication.Problem detectionsystem catalog base tables only2022-11-15 16:43MIT License
144Not inherited CHECK constraints that are recreated in the immediate subtableFind base table CHECK constraints that have been defined as NOT INHERITED but the constraint with the same Boolean expression has been defined in the immediate subtable of the table.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
145Perhaps the type of a base table column/domain should be BOOLEAN (based on CHECK constraints)Find base table columns and domains that have a CHECK constraint that limits possible values in a manner that seems to indicate that the permitted values represent truth values, i.e., permitted values are 0/1 or true/false.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
146Perhaps the type of a base table column/domain should be BOOLEAN (based on types and default values)Find base table columns and domains that have a textual type and the default value that represents a truth-value. For instance, the type of a column could be VARCHAR and the column has the default value 'TRUE'.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
147Perhaps the type of a base table column/domain should be temporal (based on default values)Find base table columns and domains that have a textual type but the default value that represents a temporal value (either a static value or invocation of a function that returns such value). Specify for each column/domain a right data type that takes into account expected values in the column/domain.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
148Base table columns where TOAST-ing strategy has been changedFind base table columns in case of which the system can use TOAST technique (due to the data type of the column) and where the toasting strategy has been changed so that it is different than the default strategy determined by the type. Make sure that the new strategy is optimal.Generalsystem catalog base tables only2020-11-06 14:51MIT License
149Base table columns where TOAST-ing strategy has been changed to plainFind base table columns in case of which the system can use TOAST technique (due to the data type of the column) and where the toasting strategy has been changed to plain. It means that potentially, if a value in the column is large enough, it is not possible to save the row.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
150Base table columns for recording geographic coordinates (based on column names)Find base table columns that are according to the name meant for recording coordinates.GeneralINFORMATION_SCHEMA only2021-10-08 11:59MIT License
151Base table columns for recording geographic coordinates that do not have a suitable type (based on column names)Find base table columns that are according to the name meant for recording geographic coordinate but do not have a suitable type (numeric or point).Problem detectionINFORMATION_SCHEMA only2021-10-08 12:01MIT License
152Candidate key columns that have a static default valueFind base table columns that are covered by a primary key or a unique constraint and that probably have a static default value.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-12 11:32MIT License
153Address field size is incorrect (too short or too long)Find base table columns that are meant for recording different types of addresses where the filed size does not take into account the possible maximum length.Problem detectionINFORMATION_SCHEMA only2023-11-09 12:55MIT License
154Columns 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
155Perhaps the type of a base table column should be BOOLEAN (based on column names)Find base table columns that based on the name seem to hold truth values. Find columns that name starts with "is_" or "has_" or "can_" or "on_" and that do not have Boolean type.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-03 09:41MIT License
156Base table column of surrogate key values does not have an integer data type (based on column names)Find base table columns that belong to a primary key, unique, or foreign key constraint and that name refers to the possibility that these are used to hold surrogate key values. Find the columns where the data type of the column is not an integer type or uuid.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-13 12:10MIT License
157More than one index on a columnFind base table columns that belong to more than one index (including automatically created indexes that support constraints).Generalsystem catalog base tables only2021-11-10 14:44MIT License
158Columns 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
159Perhaps the column type should be UUIDFind base table columns that do not have uuid type but the name of the column refers to the possibility that the values in the column are uuid's.Problem detectionINFORMATION_SCHEMA only2022-06-09 15:07MIT License
160Perhaps the type of a base table column should be BOOLEAN (based on enumerated types)Find base table columns that have an enumerated type that seems to emulate Boolean type.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License