Catalog of PostgreSQL queries for finding information about a PostgreSQL database and its design problems

AND
ANDMedium number of false-positive results
AND
ANDFrom where does the query gets its information?
AND
AND

There are 323 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
1Address 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
2A getter does not return a valueFind user-defined SQL and PL/pgSQL routines that do not return a value although the name suggest that it should return a value (starts with "get").Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-06 14:24MIT License
3A predefine character class has been incorrectly specifiedFind regular expressions where a predefined character class is incorrectly specified, e.g. [digit] instead of [:digit:].Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-23 12:09MIT License
4A routine is invoked only onceFind user-defined routines that are invoked by exactly one user-defined routine.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-10 17:11MIT License
5A setter does not update a tableFind user-defined non-trigger SQL and PL/pgSQL routines that name starts with "set" (but not with "setting") but do not contain a UPDATE statement.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-27 18:35MIT License
6A state machine is implemented with the help of an enumeration typeFind implementations of state machines that uses an enumeration type.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-26 15:39MIT License
7Base table column of comments/descriptions has an incorrect data type or maximum character lengthFind base table columns that name refers to the possibility that these are used to register comments/descriptions. Find the columns where the data type is not VARCHAR and TEXT or in case of VARCHAR the maximum number of permitted characters is smaller than 1000. In case of determining field sizes choose a size that permits registration of all possible legal values.Problem detectionINFORMATION_SCHEMA only2022-05-01 13:39MIT License
8Base table column of measurements does not have a correct data typeFind base table columns that name refers to the possibility that these are used to register measurement results. Find the columns that do not have an integer or numeric type.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
9Base table column of national identification numbers does not have a correct data typeFind non-textual base table columns that name refers to the possibility that these are used to register national identification numbers (personal codes). The codes can contain additional symbols to numbers.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
10Base table column of national identification numbers has a too short field sizeFind base table columns with VARCHAR type that name refers to the possibility that these are used to register national identification numbers (personal codes). Find the columns where the field size is shorter than 20.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
11Base table column of quantities does not have a numeric type (based on column names)Find base table columns that name refers to the possibility that these are used to register quantities of things. Find the columns that do not have a numeric type.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
12Base table column of sums of money does not have a numeric type (based on column names)Find base table columns that name refers to the possibility that these are used to register prices/sums of money. Find columns that do not have a numeric type.Problem detectionINFORMATION_SCHEMA only2021-03-21 11:45MIT License
13Base 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
14Base 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
15Base table columns permitting e-mail addresses without @ signFind non-foreign key base table columns that name refers to the possibility that these are used to register e-mail addresses. Find the columns that do not have any simple CHECK constraint that contains @ sign. A simple check constraint covers a single column. In this case registration of e-mail addresses without @ is most probably not prohibited.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
16Base table columns permitting empty strings and strings that consist of only whitespace charactersFind non-foreign key columns of base tables that have a textual type and do not have any simple CHECK constraint, i.e., a constraint that involves only one column. Such columns can contain the empty string and strings that consist of only whitespace.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
17Base table columns permitting empty strings and strings that consist of only whitespace characters (2)Find non-foreign key columns of base tables that have a textual type and do not have a simple CHECK constraint (i.e., a constraint that involves only one column) that seems to prohibit empty strings and strings that consist of only whitespace as well as a simple CHECK constraint that specifies permitted symbols.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-02 16:52MIT License
18Base table columns permitting negative prices/quantityFind non-foreign key base table columns that name refers to the possibility that these are used to register prices/quantities. Find the columns that do not have any simple CHECK constraints, i.e., a constraint that covers only this column. In this case registration of negative price/quantity is most probably not prohibited.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-10-06 14:14MIT License
19Base table columns permitting telephone numbers without digitsFind non-foreign key base table columns that name refers to the possibility that these are used to register phone numbers. Find the columns that do not have any simple CHECK constraint that references to the character class of digits. A simple check constraint covers a single column. In this case registration of e-mail addresses without digits is most probably not prohibited.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-09 12:52MIT License
20Base table columns permitting temporal values that may be outside the range of logical valuesFind base tables columns with temporal types (date and timestamp) that do not belong to a foreign key and that do not have any associated simple CHECK constraints, i.e., constraint that involves only one column. For instance, in the column registration_time that does not have any associated CHECK constraints could be values '1200-01-01 00:00' or '5900-12-31 00:00'. Rows with these values most probably represent wrong propositions and the system should restrict registration of such data.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-17 00:40MIT License