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...
641A 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
642Grantable table privilegesFind table privileges that the carrier of the privilege can in turn grant to others, i.e., the privileges have been given WITH GRANT OPTION. The number of privileges that can be passed on should be as small as possible.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-07 13:43MIT License
643Table, routine, and usage privileges that have been granted to a superuserFind table, routine, and usage privileges that have been granted to a superuser. Superuser can do anything in the database and thus does not need the privileges. The result is a sign that perhaps the executed GRANT statements were incorrect (wrong username) or the grantee later got superuser status (that it shouldn't have).Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
644One true lookup tableFind tables that contain all (or most) of the classifier values and tables that refer to these.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
645Table has both state and status columnsFind tables that contain both a state and a status column.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 15:26MIT License
646Table has multiple columns for free-form descriptionsFind tables that contain multiple columns for free-form textual descriptions. Make sure that the names of columns are understandable and sufficiently different. Make sure that there are no duplicate columns.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 15:36MIT License
647Small tablesFind tables that have one column or zero columns.GeneralINFORMATION_SCHEMA+system catalog base tables2021-03-07 10:52MIT License
648Name and description maximum lengthFind tables where is both a column for registering name and description. Find the permitted maximum field size in these columns. Take into account that the maximum length may be controlled by using a CHECK constraint. Make sure that the permitted maximum field sizes are sufficiently different.GeneralINFORMATION_SCHEMA+system catalog base tables2021-02-24 20:36MIT License
649Trigger is used to enforce referential integrityFind tables where user-defined (non-system) triggers are used to implement referential integrity. In addition to table name show the triggers and the number of triggers.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
650Tables with the same name in different schemasFind tables with the same name in different schemas. Make sure that this is not a duplication.GeneralINFORMATION_SCHEMA+system catalog base tables2021-11-10 15:40MIT License
651Username is not uniqueFind textual columns that potentially contain usernames (including columns that potentially contain e-mail addresses) that do not have a unique constraint or a unique index that involves only this column.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
652Base tables with the biggest number of rowsFind the base tables that belong to the top 5 in terms of the number of rows in the table. There should be test data in the tables.Generalsystem catalog base tables only2022-10-21 01:48MIT License
653Base tables where all the unique columns are optionalFind the base tables where all the unique columns are optional. In such tables there can be rows without values that identify these rows. In this case there can be rows in the table where the values that should identify the row are missing.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-10-21 01:47MIT License
654Different foreign key column names in case of referencing the same candidate keyFind the cases when the names of columns in different foreign keys that reference to the same candidate key are different. If different names reflect different roles, then it is legitimate. However, there could also be accidental differences that makes it more difficult to use the database.Problem detectionsystem catalog base tables only2021-03-12 11:21MIT License
655Columns that have the same name as their domain/typeFind the columns that name is the same as the name of the type of the column or the domain of the column.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-30 13:04MIT License
656Phone number column has an incorrect data typeFind the columns where the name reffers to the possibility that the column contains phone numbers but the type of the column is not VARCHAR or TEXT.Problem detectionINFORMATION_SCHEMA only2021-03-27 19:00MIT License
657Using system-defined names of constraints (constraints that involve more than one column)Find the constraint types in case of which there exists system-defined names.Problem detectionsystem catalog base tables only2023-01-10 14:53MIT License
658Using system-defined names of constraints (constraints that involve one column)Find the constraint types in case of which there exists system-defined names.Problem detectionsystem catalog base tables only2023-01-10 14:53MIT License
659Derived tables that have a column with the xid typeFind the derived tables (views and materialized views) that have a column with the xid type, i.e., these use the data from the hidden xmin column of a base table. If one uses optimistic approach for dealing with the concurrent data modifications, then xmin values should be presented by views and used in routines that modify or delete rows.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
660Different non-surrogate key default valuesFind the different default values that implement something other than a surrogate key.GeneralINFORMATION_SCHEMA only2021-03-04 10:31MIT License