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...
41All user triggers that are associated with tablesFind user-defined triggers that react to data modifications in tables. Triggers should be used only for the tasks that cannot be achieved in a declarative manner, i.e., by declaring a constraint. Triggers of the same table with the same event_manipulation, action_timing, and action_orientation are sorted based on the trigger name. This is the order of execution of triggers.GeneralINFORMATION_SCHEMA+system catalog base tables2021-01-19 11:27MIT License
42AND takes precedence over ORMake sure that Boolean expressions take into account precedence rules of Boolean operators. AND operator has precedence over OR operator.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
43A non-parameterized table function instead of a viewFind table functions that do not have any parameters. Prefer simpler and more portable solutions.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-03 21:16MIT License
44A 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
45Are the passwords hashed?Find base table columns that name refers to the possibility that these are used to register passwords. Return a value from each such column. Make sure that the password is not registered as open text.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-10 12:14MIT License
46Are 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
47A 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
48A 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
49A 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
50A state machine is implemented with the help of a state classifier tableFind implementations of state machines that use a state classifier table.Generalsystem catalog base tables only2023-11-26 15:39MIT License
51A 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
52At 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
53At 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
54Base table column name is the same as its domain nameFind base table columns that have the same name as the domain name or the data type name of the column. The names may have different uppercase/lowercase characters. Columns, domains, and types are different concepts in SQL and perhaps it is better to use different names in case of these.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
55Base 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
56Base 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
57Base 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
58Base 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
59Base table column of personal names has questionable propertiesFind base table columns that name refers to the possibility that these are used to register personal names. Although there are very long personal names the general approach is to register a shortened version of these. Thus, a large field size is not a good idea because it would cause usability and security problems. There are persons who only have one name (mononymous persons). Database design must take it into account.Problem detectionINFORMATION_SCHEMA only2022-10-29 20:35MIT License
60Base 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