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...
81Triggers with arguments from the CREATE TRIGGER statementFind triggers that get an argument from the CREATE TRIGGER statement.GeneralINFORMATION_SCHEMA+system catalog base tables2023-12-22 12:35MIT License
82All rulesFind user-defined rules for rewriting data manipulation language statements. Rules should be used only for the tasks that cannot be achieved in a declarative manner, i.e., for example, by declaring a constraint.Generalsystem catalog base tables only2023-12-22 12:30MIT License
83UPDATE triggersFind all UPDATE triggers. Make sure that they specify a correct set of columns in which data modification will fire the trigger.GeneralINFORMATION_SCHEMA only2023-12-22 09:47MIT License
84Unnamed columns in routinesFind user-defined routines that contain a SQL statement that does not give the name to a column in a SQL statement.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-22 00:04MIT License
85Perhaps a reference to the variable NEW is missingFind row level before insert and before update triggers that only task is not to raise an exception and where the variable NEW is not used in the trigger routine outside the RETURN clause.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-21 20:34MIT License
86Perhaps a reference to the variable OLD is missingFind row level before delete triggers that only task is not to raise an exception and where the variable OLD is not used in the trigger routine outside the RETURN clause.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-21 19:29MIT License
87User-defined routines that read dataFind user-defined routines that contain SELECT … FROM or PERFORM … FROM operations. PostgreSQL uses multiversion concurrency control (MVCC). Therefore, SELECTs do not block modifications and vice versa. One has to take steps to achieve correct behaviour of data access code. In addition, one should not ask data with multiple queries if it is possible to achieve the result with only one query.GeneralINFORMATION_SCHEMA+system catalog base tables2023-12-21 15:00MIT License
88Multiple RETURNING clauses in a SQL functionFind SQL functions that have multiple statements with the RETURNING clause.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-21 13:59MIT License
89Columns of derived tables that name has been given by the system (2)Find columns of derived tables (i.e., views and materialized views) where in the creation statement of the table the name of the column has not been specified, i.e., it is generated by the system.Problem detectionsystem catalog base tables only2023-12-21 12:17MIT License
90Columns of derived tables that name has been given by the systemFind columns of derived tables (i.e., views and materialized views) where in the creation statement of the table the name of the column has not been specified, i.e., it is generated by the system.Problem detectionsystem catalog base tables only2023-12-21 12:15MIT License
91Deterministic (immutable) functions that do not return a valueFind deterministic (immutable) functions that do not return a value. This goes against the idea of deterministic functions.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-20 19:33MIT License
92Base table columns permitting temporal values that may be outside the range of logical valuesFind base tables columns with temporal types (date and timestamp) that do not belong to a foreign key and that do not have any associated simple CHECK constraints, i.e., constraint that involves only one column. For instance, in the column registration_time that does not have any associated CHECK constraints could be values '1200-01-01 00:00' or '5900-12-31 00:00'. Rows with these values most probably represent wrong propositions and the system should restrict registration of such data.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-17 00:40MIT License
93FILLFACTOR 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
94Not equals check in unstandardized wayFind user-defined routines that use != operator to test as to whether two values are not equal.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-13 14:16MIT License
95Perhaps 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
96User-defined derived tablesFind user-defined views and materialized views. Pay attention to the outer join operations. One should use these if and only if there is a real need for them. Otherwise they just reduce performance. On the other hand, pay attention that outer join is used where it is logically needed.GeneralINFORMATION_SCHEMA+system catalog base tables2023-12-11 15:23MIT License
97Explicit lockingPostgreSQL uses Multi-version Concurrency Control (MVCC) and thus, sometimes, one has to explicitly lock certain rows or entire table. One has to use LOCK TABLE or SELECT … FOR UPDATE statements for that.GeneralINFORMATION_SCHEMA+system catalog base tables2023-12-11 15:02MIT License
98Incorrect comparison operatorFind PL/pgSQL routines that use comparison operators =< or =>.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-11 14:50MIT License
99A routine is invoked only onceFind user-defined routines that are invoked by exactly one user-defined routine.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-10 17:11MIT License
100Perhaps inconsistent use of temporal functionsFind routines that use temporal functions CURRENT_TIMESTAMP, LOCALTIMESTAMP, or now() that is inconsistent with the default values of the columns that are used by the routine, e.g., function uses a column with the default value LOCALTIMESTAMP but the routine uses function CURRENT_TIMESTAMP or now().Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-10 17:11MIT License