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...
221Are there enough routines that implement database operations?Find user-defined routines that implement database operations (comment refers to an operation) but show these only if there are at least eight such routines. Contracts of database operations are specified in the system analysis documentation. The contracts apply the idea of design by contract in the field of databases.GeneralINFORMATION_SCHEMA+system catalog base tables2021-11-03 20:07MIT License
222A 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
223A 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
224A 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
225A table has the same name as a routineFind table names that are the same as some routine name. Use different names to avoid confusion.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
226At most one row is permitted in a table (based on check constraints)Find base tables and foreign tables where based on a check constraint, a key constraint, and a NOT NULL constraint can be at most one row. Make sure that this is the real intent behind the constraint, not a mistake. Find tables where a check constraint permits only one possible value in a column, the column has NOT NULL constraint, and constitutes a key, i.e., has the PRIMARY KEY or UNIQUE constraint.GeneralINFORMATION_SCHEMA+system catalog base tables2022-11-03 15:21MIT License
227At most one row is permitted in a table (based on enumeration types)Find base tables and foreign tables where based on the type of a column, a key constraint, and a NOT NULL constraint can be at most one row. Make sure that this is the real intent behind the constraint, not a mistake. Find tables where a column has an enumeration type with exactly one value, the column has NOT NULL constraint, and constitutes a key, i.e., has the PRIMARY KEY or UNIQUE constraint.GeneralINFORMATION_SCHEMA+system catalog base tables2022-11-03 15:18MIT License
228Base 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
229Base 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
230Base 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
231Base 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
232Base 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
233Base 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
234Base 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
235Base table columns permitting URLs without a protocolFind non-foreign key base table columns that name refers to the possibility that these are used to register URLs. Find the columns that do not have any simple CHECK constraint that references to a protocol. A simple check constraint covers a single column. In this case registration of URLs without a protocol is most probably not prohibited.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-01 13:13MIT License
236Base table columns with an array typeFind base table columns with an array type. Think through as to whether a column with an array type could be replaced with a separate table.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
237Base table FILLFACTOR is not 100Find all base tables where FILLFACTOR is not 100, i.e., the default value.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
238Base table has a national identification number as a keyFind base table columns that name refers to the possibility that these are used to register national identification numbers (personal codes). Find the columns that constitute a key of a table. This in turn enforces a (restrictive) business rule that all persons of interest come from one country. Make sure that the enforced constraint is valid, i.e., there is indeed such rule in the domain.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
239Base tables and foreign tables that do not have any CHECK constraints on non-foreign key columnsIdentify possibly missing CHECK constraints.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
240Base tables and materialized views without any indexFind base tables and materialized views that do not have any index.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-05 19:39MIT License