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...
361Extension 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
362Extreme 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
363FILLFACTOR 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
364FILLFACTOR is probably too smallToo small fillfactor wastes storage space.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-02 10:43MIT License
365Find 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
366Find 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
367Flag 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
368Foreign 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
369Foreign 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
370Foreign 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
371Foreign 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
372Foreign key references a non-key (has optional columns)Find foreign key constraints that referenced column is optional.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-10 12:12MIT License
373Foreign servers without user mappingsFind foreign servers that do not have any associated user mappings. "A user mapping typically encapsulates connection information that a foreign-data wrapper uses together with the information encapsulated by a foreign server to access an external data resource."Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
374FOR UPDATE in derived tablesFind derived tables that subquery uses FOR UPDATE construct. Reading a data element shouldn't block other read operations of the same element. Thus, you shouldn't use exclusive locking command in a view.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-12-12 11:11MIT License
375FOR UPDATE is not allowed with aggregate functionsImplement explicit locking correctly. Instead of writing, for instance, SELECT Count(*) AS cnt FROM person WHERE person_id=1 FOR UPDATE; one has to write SELECT person_id FROM person WHERE person_id=1 FOR UPDATE;Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 11:23MIT License
376FOR UPDATE is not needed if there is no FROM clause in the SELECT statementFind routines that use SELECT … FOR UPDATE without selecting rows from a specific table. For instance: SELECT 'text' AS v FOR UPDATE;Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-05 14:10MIT License
377Frequency of column name lengths based on the table typeFind in case of base tables, materialized views, and views the number of columns based on the length of the column name.Sofware measureINFORMATION_SCHEMA+system catalog base tables2022-11-22 14:43MIT License
378Frequency of lengths of the names of database objects"Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find how many names (identifiers) of database objects there are with different lengths. The values could be used to compare different databases.Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-03-17 01:10MIT License
379Frequency of name components of database objects"Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) Names should be expressive. Find, what are the most popular components of the names (identifiers) of user-defined database objects, assuming, that the separator of the components is "_".Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-03-17 10:12MIT License
380Frequency of table name lengths based on the table typeFind in case of base tables, materialized views, and views the number of tables based on the length of the table name.Sofware measureINFORMATION_SCHEMA+system catalog base tables2022-11-23 01:09MIT License