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...
321Explicit 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
322Explicit 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
323Extension routinesFind all routines that belong to an extension.Generalsystem catalog base tables only2020-11-06 14:51MIT License
324Extension routines in the schema "public"Find extensions that routines are in the schema public.Generalsystem catalog base tables only2024-01-04 11:56MIT License
325Extension 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
326Extensions that are available but are not installedTry to use as much the possibilities of the DBMS as possible. On the other hand, do not install extensions that are not needed in order not to overcomplicate the database.Generalsystem catalog base tables only2020-11-06 14:51MIT License
327Extreme 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
328Field 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
329FILLFACTOR 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
330FILLFACTOR is probably too smallToo small fillfactor wastes storage space.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-02 10:43MIT License
331Find all non-foreign key columns of base tablesFind all non-foreign key columns of base tables. Make sure that no foreign key constraint is missing.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-21 02:59MIT License
332Find all publicationsFind publications of tables that have been created in order to enable logical replication.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-18 15:09MIT License
333Flag 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
334Foreign 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
335Foreign 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
336Foreign 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
337Foreign key columns that do not have an integer or varchar typeFind foreign key columns that do not have smallint, integer, bigint, or varchar(n) type. These are the most commonly used types in case of key/foreign key columns. Although the use of other types would be perfectly legal as well, make sure that you have selected the best possible data type for each and every column.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-16 10:14MIT License
338Foreign key columns that have no indexFind foreign key columns that do not have an index. Foreign key columns are often used for performing join operations. It is useful to index such columns.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
339Foreign key constraint references to the columns of a UNIQUE constraint not to the columns of the PRIMARY KEY constraintFind foreign key constraints that reference to a UNIQUE constraint columns not to the PRIMARY KEY constraint columns. This is legal in SQL. However, a tradition is to refer to the primary key columns. If most of the foreign keys refer to the primary key columns, then it raises a question as to whether this kind of design decision has a good reason in a particular case or whether it is an inconsistency.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
340Foreign key constraint references to the columns of a UNIQUE constraint not to the columns of the PRIMARY KEY constraint while the referenced table has the primary keyFind foreign key constraints that reference to a UNIQUE constraint columns not to the PRIMARY KEY constraint columns while at the same time the referenced table does have the primary key. This is legal in SQL. However, a tradition is to refer to the primary key columns. If most of the foreign keys refer to the primary key columns, then it raises a question as to whether this kind of design decision has a good reason in a particular case or whether it is an inconsistency.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License