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...
301Potentially missing default values of base table columnsFind columns of base tables without a default value that are either Boolean columns that based on the name seem to implement a state machine or temporal columns that based on the name seem to keep registration or update time. These columns often have a default value.Problem detectionINFORMATION_SCHEMA only2023-11-15 17:03MIT License
302Columns of derived tables that name has been given by the systemFind columns of derived tables (i.e., views and materialized views) where in the creation statement of the table the name of the column has not been specified, i.e., it is generated by the system.Problem detectionsystem catalog base tables only2023-12-21 12:15MIT License
303Columns of derived tables that name has been given by the system (2)Find columns of derived tables (i.e., views and materialized views) where in the creation statement of the table the name of the column has not been specified, i.e., it is generated by the system.Problem detectionsystem catalog base tables only2023-12-21 12:17MIT License
304Names of the columns of derived tables that have been given by the systemFind columns of derived tables that name has been given by the system. The creators of the table should specify the name themselves to avoid ugly names and nasty surprises.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-15 16:48MIT License
305Names of columns that hold personal names but do not take into account cultural diversityFind columns of tables (base tables, views, materialized views, foreign tables) that have the name first_name or last_name. Such column names do not take into account that different cultures use different personal name components and the number of possible components is more than two. If in a culture, the surname is presented before the given name, then the column names causes confusion.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
306Inconsistent naming of comment columnsFind columns of tables that start with the word comment or komment but end differently (excluding numbers). Return result only if there is more than one naming variant of such columns in the database. For instance, a column has the name "comment" but another "comments".Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-15 14:09MIT License
307Potentially a classifier is missing (based on field sizes)Find columns that are not covered by a primary key, unique, and foreign key constraint but have a textual type with the maximum field size 3 or less.GeneralINFORMATION_SCHEMA+system catalog base tables2021-03-10 13:07MIT License
308Potentially a classifier table is missing (based on field sizes)Find columns that are not covered by a primary key, unique, and foreign key constraint but have a textual type with the maximum field size 3 or less and where the column name does not refer to names or comments. Return only data about these columns where there is no table with a similar name. Return data only about tables that could be referenced from more than one table.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-18 20:08MIT License
309Registration/modification time is not mandatoryFind columns that contain registration or modification time but are optional.Problem detectionINFORMATION_SCHEMA only2023-11-26 16:51MIT License
310Perhaps duplicate check of empty strings (ver 2)Find columns that have a check that prevents the empty string in the column but there is already another check on the column that enforces the constraint.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-12-20 11:30MIT License
311Duplicate check of empty stringsFind columns that have a check that prevents the empty string in the column but there is already another check on the column that enforces the constraint. If there is a constraint description!~'^[[:space:]]*$', then it covers the constraint description!='' and the latter becomes redundant.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-12-19 15:08MIT License
312Columns defined in a subtableFind columns that have been added to a subtable, i.e., these were not defined in its immediate supertable.GeneralINFORMATION_SCHEMA+system catalog base tables2021-01-02 03:22MIT License
313Duplicate NOT NULL constraintsFind columns that have NOT NULL constraint through a domain and also directly. Do not duplicate NOT NULL constraints in orde to avoid confusion and surprises.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
314Column name contains the table nameFind columns that have the same name as the table. The names may have different uppercase/lowercase characters. Make sure that the naming style is consistent.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-06 12:38MIT License
315Column name is the same as the table nameFind columns that have the same name as the table. The names may have different uppercase/lowercase characters. Sometimes columns with such names are used as the key columns. Make sure that the naming style is consistent.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-06 12:38MIT License
316Password is uniqueFind columns that potentially contains passwords and that participate in a unique constraint or indexProblem detectionINFORMATION_SCHEMA+system catalog base tables2022-06-09 13:21MIT License
317Storing file content in the databaseFind columns that probably store content of files in the database.GeneralINFORMATION_SCHEMA only2021-03-27 17:02MIT License
318Columns with array or user-defined typeFind columns with an array or a user-defined type. Each columns should have the most appropriate data type.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-19 17:04MIT License
319Precision of a timestamp or a time column is too bigFind columns with a timestamp or a time type where the precision (the permitted maximum number of fractional sections) is bigger than the precision in the default value of the column.Problem detectionINFORMATION_SCHEMA only2023-11-02 17:29MIT License
320Columns with BYTEA or OID typeFind columns with BYTEA or OID type. These columns are potentially meant for storing large objects. Each columns should have the most appropriate data type.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-19 17:00MIT License