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...
401Each table is both referencing and referenced table (perhaps there is a cycle in relationships)Find as to whether the relationships between tables form a complete bidirected graph. Tables are vertices in the graph. There is a directed edge between two vertices if one of the tables refers to another through foreign key relationship on mandatory columns.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-28 14:04MIT License
402Empty columnsFind columns in non-empty tables that do not contain any values. If there are no values in a columns, then it may mean that one hasn't tested constraints that have been declared to the column or implemented by using triggers. It could also mean that such columns are not needed at all.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
403Empty schemasFind schemas without schema objects.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-04 15:30MIT License
404Empty tablesFind base tables where the number of rows is zero. If there are no rows in a table, then it may mean that one hasn't tested constraints that have been declared to the table or implemented by using triggers. It could also mean that the table is not needed because there is no data that should be registered in the table.Problem detectionsystem catalog base tables only2022-10-21 15:55MIT License
405Enumerated or range types with the same name in different schemasFind cases where in different schemas there are enumerated or range types with the same name. Types are like words that can be used to construct generalized claims about the real world (table predicates). Better not to duplicate the words in the dictionary. Also make sure that this is not a duplication.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
406Enumerated types with zero or one valueFidn enumerated types with zero or one value. Type is a named finite set of values. The empty set is a set. A set with one value is a set. Thus, types with zero or one value are legal. In practical terms each type, usually, should contain at least two values.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
407Excessive privileges on databases, schemas, domains, types, languages, foreign data wrappers, and foreign serversFind excessive privileges on databases, schemas, domains, collations, sequences, foreign data wrappers, and foreign servers that are probably not needed by a typical application.Problem detectionsystem catalog base tables only2021-12-31 14:40MIT License
408Exclude constraint instead of simple UNIQUEFind exclude constraints that implement a simple UNIQUE constraint. The checking might be slower compared to UNIQUE constraint.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
409Explicit locking is missingPostgreSQL uses multiversion concurrency control (MVCC). SELECTs do not block modifications and vice versa. One has to take steps to achieve correct behaviour.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-14 00:35MIT License
410Explicit locking is missing (2)Find user-defined routines that have a subquery in a DELETE or UPDATE statement without the FOR UPDATE clause.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-06 12:15MIT License
411Explicit locking is probably not neededYou do not need explicit locking (LOCK TABLE or SELECT … FOR UPDATE) in case of routines that only search some data but do not modify any data and do not raise any exception.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 12:08MIT License
412Extension routines that execution privilege has been granted to PUBLICKnow the privileges that users have in your system. Probably all the database users do not need these privileges.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
413Extreme contractionFind names that contain extremely short terms, due to an excessive word contraction, abbreviation, or acronym usage.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-18 16:31MIT License
414Field size is not sufficiently different in case of base table columnsFind base table columns that name refers to the possibility that these are used to register names. Find base table columns that name refers to the possibility that these are used to register comments/descriptions/etc. Find the cases where a base table contains columns from the both sets and the field size in case of the latter is not at least twice as big as in case of the former. For example, if the name of a service can be 100 character long, then it is quite illogical that the description of the service is only at most 200 characters long.Problem detectionINFORMATION_SCHEMA only2021-03-27 18:51MIT License
415FILLFACTOR is probably too bigFind base tables in case of which the FILLFACTOR property has perhaps a too big value. Try to find base tables that probably encounter UPDATE operations. In the tables that have frequent updates you want to have free space in table pages (blocks) to accommodate new row versions, which the system automatically creates as a result of fulfilling UPDATE statements. If a new row version will be put to another page by the system, then it means that table indexes have to be updated as well. Thus, the more there are indexes, the more the table would benefit from keeping a new row version in the same page as the old version.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-17 00:22MIT License
416FILLFACTOR is probably too smallToo small fillfactor wastes storage space.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-02 10:43MIT License
417Flag parametersA Boolean parameter may be used to determine what task to fulfill. In this case the routine has multiple tasks and does not satisfy the separation of concerns principle.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 10:48MIT License
418Foreign key column has a default value that is not present in the parent tableFind foreign key columns that have a default value that is not present in the parent table. Identify default values that cause violations of the referential constraints.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
419Foreign key column has a simple check constraint that is attached directly to the tableFind foreign key columns that are covered by a simple check constraint, i.e., the constraint involves only one column. Look only constraints that are directly associated with the table, i.e., are not specified through a domain. Perhaps the constraint should be defined on the referenced candidate key column.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
420Foreign key columns that are associated with a sequence generatorFind foreign key columns that are associated with a sequence generator. Foreign key values are selected amongst the values that are registered as corresponding primary key/unique key values. Values in the foreign key columns are not directly generated by the system. These values might be system generated indirectly - generated when a row is added to the primary (parent) table.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-08 00:42MIT License