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...
41Base tables with multiple comment columnsFind base tables with more than one comment columnsGeneralINFORMATION_SCHEMA only2021-04-02 12:21MIT License
42Base tables with multiple name columnsFind base tables with more than one name columns. Perhaps the normalization level of the table is low.GeneralINFORMATION_SCHEMA only2021-04-02 12:21MIT License
43Base tables with multiple temporal columnsFind base tables that have more than one column with a temporal type (date or timestamp).GeneralINFORMATION_SCHEMA only2021-02-19 17:37MIT License
44Boolean column for genderFind base table columns that have Boolean type and based on the column name are meant for recording data about gender.Problem detectionINFORMATION_SCHEMA only2022-04-18 00:57MIT License
45Cannot accommodate all the fractional seconds in case of table columnsThe precision of a timestamp type of a column must be able to accommodate all the fractional seconds of the default value of the column. Find table columns with the type timestamp without time zone(m) or timestamp with time zone(m) that have a default value LOCALTIMESTAMP(n) or CURRENT_TIMESTAMP(n) WHERE n>m.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
46CHAR columns have a default value that length is shorter from the character maximum length of the columnChoose a suitable data type, field size, and default value. If the default value is shorter from the character maximum length, then spaces will be added to the end of the registered value.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
47CHAR or VARCHAR columns have a default value that length is longer from the character maximum length of the columnFind table columns with CHAR or VARCHAR type that have a default value that length is longer from the character maximum length of the column. Choose a suitable data type, field size, and default value. If the value is longer, then it is impossible to register it in a field, i.e., it makes registration of data impossible (except if the excessive characters are spaces).Problem detectionINFORMATION_SCHEMA only2022-10-31 10:19MIT License
48CHECK constraints on columns with Boolean dataFind check constraints that involve columns with the type Boolean.GeneralINFORMATION_SCHEMA only2020-12-27 15:09MIT License
49CHECK constraints on columns with personal namesFind CHECK constraints on base table or foreign table columns that contain data about personal names. Make sure that the constraints do not restrict registration of legal names.GeneralINFORMATION_SCHEMA only2023-12-25 12:51MIT License
50CHECK constraints on columns with temporal dataIf your table contains columns with temporal data, then it will be appropriate to restrict the range of possible values in these columns because some of the values that belong to the type might not be appropriate (for instance, imagine a client who was born in 1100-12-03 or a contract that was registered in 3890-12-12- 12:45). If your table contains multiple columns with temporal data that denote events, then the rule about the order of the events must be enforced, if possible.GeneralINFORMATION_SCHEMA only2023-12-25 12:37MIT License
51CHECK constraints that use non-deterministic functionsDiscover incorrect usage of non-deterministic functions in CHECK constraints. Find base table columns and foreign table columns that have a CHECK constraint that refers to a non-deterministic function that returns current date/time/timestamp.GeneralINFORMATION_SCHEMA only2020-11-06 14:51MIT License
52Columns 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
53Columns of base tables that hold truth values but do not have a default value (Boolean columns)Find columns of base tables that have type BOOLEAN but do not have a default value. There are only two truth values - TRUE and FALSE - in case of two-valued logic. Often it should be possible to select one of these as the default value of a column that has BOOLEAN type.Problem detectionINFORMATION_SCHEMA only2023-11-09 13:14MIT License
54Columns of base tables that hold truth values that do not have a default value although they could have it (Boolean columns)Find columns of base tables that have type BOOLEAN. 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 only2023-11-09 16:39MIT License
55Columns 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
56Columns 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
57Consistency 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
58Consistency of using NOT NULL constraints on Boolean base table columnsFind the number of mandatory and optional Boolean base table columns and the proportion of optional columns from all the Boolean columns. Use two-valued logic (TRUE, FALSE) instead of three-valued logic (TRUE, FALSE, UNKNOWN). Because NULL in a Boolean column means unknown make all the Boolean columns mandatory.Sofware measureINFORMATION_SCHEMA only2020-12-28 01:43MIT License
59Data type usage in the base table columnsGet overview of used data types in the columns of base tables. If the selection is very small then this is a warning sign that perhaps unsuitable types have been used.GeneralINFORMATION_SCHEMA only2023-12-22 12:39MIT License
60Default is NULLFind all tables where default value is NULL. NULL is the marker that denotes missing value. Implicitly all columns that do not have a default value have the default NULL. There is no need to specify such default value.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License