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...
341Database object that belong to the public interface (virtual data layer) and that names contain the letters õäöüÕÄÖÜFind database object that belong to the database public interface (virtual data layer - consists of routines and derived tables) and that names contain the letters õäöüÕÄÖÜ (Estonian letters with a diacritic). These letters belong to the Estonian alphabet but do not belong to the ASCII character set. Although permitted by the DBMS, such letters might make it more difficult to use the interface by other programs.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
342Database object that do not belong to the public interface (virtual data layer) and that names contain the letters õäöüÕÄÖÜFind database object that do not belong to the database public interface (virtual data layer - consists of routines and derived tables) and that names contain the letters õäöüÕÄÖÜ (Estonian letters with a diacritic). These letters belong to the Estonian alphabet but do not belong to the ASCII character set. Although permitted by the DBMS, such letters might make the naming style inconsistent with the naming style of elements that belong to the public interface. If applications access base tables directly, then the letters can cause the same problems as in case of derived tables, i.e., applications may have difficulties with such names.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
343Declaratively partitioned tables without partitionsFind declaratively partitioned tables that do not have any partitions. Declarative partitioning is implemented in PostgreSQL starting from PostgreSQL 10.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
344Declaratively partitioned tables with one partitionFind declaratively partitioned tables that have exactly one partition. Declarative partitioning is implemented in PostgreSQL starting from PostgreSQL 10. If there is only one partition, then it raises question as to why the additional complexity associated with partitioning is needed.Problem detectionINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
345Do you really need fractional seconds?Find default values that return current timestamp with the maximum number of fractional seconds (6).Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
346Deferrable foreign key constraint with a RESTRICT compensating actionFind deferrable foreign key constraint with ON UPDATE RESTRICT or ON DELETE RESTRICT compensating action. Referential actions are carried out before, and are not part of, the checking of a referential constraint. Deferring a referential constraint defers the checking of the of the constraint (a ) but does not defer the referential actions of the referential constraint. In PostgreSQL the essential difference between NO ACTION and RESTRICT is that NO ACTION allows the check to be deferred until later in the transaction, whereas RESTRICT does not. Thus RESTRICT could result with the failure of data modification where in case of NO ACTION the modification would succeed.Problem detectionsystem catalog base tables only2021-10-08 11:29MIT License
347Too generic names regarding persons and their names (columns of derived tables)Find derived table columns that name refers to the possibility that these contain person names. The names of derived table columns that contain person names should refer to the role that the corresponding entity type has in the view. For instance, if view active_product has a column with the name surname, then the column name does not give information what is the role of the person in the context of the view. Better name would be, for instance, registrator_surname.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-10 14:25MIT License
348Invocation of PL/pgSQL functions from the subqueries of derived tablesFind derived tables that subqueries invoke a PL/pgSQL function. Avoid context switch that is caused by the invocation of PL/pgSQL functions from the subqueries of derived tables.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-24 14:30MIT License
349Meaningless terms in derived tablesFind derived tables that subquery contains terms "foo", "bar", "foobar", or "baz".Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-06 14:08MIT License
350FOR 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
351Perhaps USING syntax could be used for joining in the subqueries of derived tablesFind derived tables that use newer join syntax where join conditions are written in the WHERE clause but do not use USING synatx.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-10 14:14MIT License
352Perhaps Trim is missingFind derived tables (views and materialized views) that apparently concatenate values (by using || operator or use Concat function or use Format function) by putting a space between these but do not use Trim function to get rid of the extra space at the beginning or the end of the string.Problem detectionsystem catalog base tables only2023-12-13 13:53MIT License
353Duplicate removal of duplicates in derived tablesFind derived tables (views and materialized views) that contain both DISTINCT and GROUP BY. Make sure that the means for removing duplicate rows from the query result are not duplicated.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
354Derived tables with multiple DISTINCT'sFind derived tables (views and materialized views) that contain more than one DISTINCT invocation. Make sure that the query is correctly written, including that it does not have unwanted formation of a Cartesian product.GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-10 13:25MIT License
355Derived table presents the same data in the same way as a single base tableFind derived tables (views and materialized views) that present data from one base table without adding columns, renaming columns, changing the order of columns, removing columns, or restricting rows. Perhaps something is missing from the subquery of the derived table.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-25 12:15MIT License
356Sorting rows based on random values in derived tables without limiting rowsFind derived tables (views and materialized views) that sort rows based on random values but do not limit the number of rows. This is unnecessary because without sorting the rows are returned in a unspecified order. Sorting based on random values is a computationally expensive operation.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
357Sorting rows based on random values in derived tablesFind derived tables (views and materialized views) that sort rows based on random values. This can be used to find a random subset of rows. It is a computationally expensive operation.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
358Set operations that do not remove duplicate rows in derived tablesFind derived tables (views and materialized views) that use a set theoretic operation (union, except or intersect) in a manner that does not remove duplicate rows and thus can produce a multiset not a set. Make sure that it is what is needed.GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-10 13:32MIT License
359Too wide derived (dependent) tableFind derived tables (views, materialized views) that are based on more than five tables and that have more than 15 columns. This view might produce "a denormalized world view" where all the data is together in one table and applications make queries based on this single view to fulfill their specific tasks. Such view does not follow the separation of concerns principle.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-12-13 12:34MIT License
360Derived tables with sortingFind derived tables where the rows are ordered, i.e., there is ORDER BY clause at the end of the view. Different users may want to see the rows in different order. Thus, the DBMS may have to do extra and unnecessary work by firstly sorting based on one set of rows and after that based on other set of rows. Use sorting if you know that all the users want the rows in the same order and cannot/will not change the order in the application.GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-22 21:34MIT License