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...
421Incorrect suffix of a constraint name or an index nameIf the name of an object has the suffix that refers to the type of the object (for instance, primary key constraint or foreign key constraint), then you should use references to the correct object type. Find suffixes of constraint names and index names that incorrectly refer to the type of the object. For instance, incorrect would be to use _chk as the suffix of an index name or _pk as the suffix of a check constraint name.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
422INFORMATION_SCHEMA is missingMake sure that you do not drop INFORMATION_SCHEMA schema. In this case most of the design checking queries will not work. This schema automatically exists in all databases.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-12-07 19:07MIT License
423Initially deferred constraint triggers with unnecessary lockingInitially deferred constraint triggers do not need explicit statements for locking tables or rows.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-10-08 11:25MIT License
424Input parameters that names do not follow the convention to start with _ or p_For the sake of making code better understandable follow naming conventions.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
425Input parameters with the same name have different typesFind named input parameters of routines that have the same name but different type. It could be a mistake or deliberate due to overloading of routines.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-24 15:01MIT License
426Insufficient number of user-defined non-trigger routinesThere must be at least n (four in this case) user-defined non-trigger routines in the database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
427Insufficient number of user-defined triggers+rulesThere must be user-defined triggers and/or rules for at least n (three in this case) tasks in the database. It also means that one should create at least three triggers and/or rules in the database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-04 11:47MIT License
428Insufficient number of user-defined triggers+rules (based on number of tasks)There must be user-defined triggers and/or rules for at least n (three in this case) tasks in the database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-04 11:46MIT License
429Insufficient routine privilegesYou must give rights to use routines to the users/roles that correspond to applications.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
430Insufficient view privilegesYou must give privileges to use views to the users/roles that correspond to applicationsProblem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
431Invalid character classPostgreSQL regular expressions do not have character classes word and letter.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 12:50MIT License
432Invalid use of the case insensitive search modifier in regular expressionsFind regular expression patterns that use (?i) modifier in any other place than at the beginning of the pattern or (?-i) in any place of the pattern. Such use of the modifiers is not supported by PostgreSQL.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 16:06MIT License
433Invocation of a system-defined routine without providing any argumentsFind user-defined routines that contain an invocation of a system-defined function without providing any argument. The query considers all aggregate functions as well as some popular scalar functions.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-22 13:00MIT License
434Invocation 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
435Is does not return a booleanFind user-defined SQL and PL/pgSQL non-trigger routines that do not return a truth value (for instance, returns an integer or does not return a value at all) although the name suggest that it should return a truth value (TRUE or FALSE).Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-06 14:25MIT License
436LEAKPROOF routines that are perhaps not leakproofYou should not give wrong information to the database management system.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-05 14:12MIT License
437Length and char_lenfgth functions are used within the same expressionFind expressions that refer to both length and char_length functions. Make sure that the expression is correct.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-09 13:44MIT License
438Lifecycle not initiatedFind non-primary key and non-unique base table foreign key columns that name refers to the possibility that these are used to register references to a state classifier. The column must belong to a foreign key and does not have a default value.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-26 15:40MIT License
439LIKE instead of =Find expressions that use LIKE predicate for precise comparison.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-09 10:43MIT License
440LIKE with a regular expression patternFind expressions that use LIKE (including ILIKE) predicate with a regular expression patterns. In a LIKE pattern one can use only _ and % metasymbols to construct a pattern.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-10-21 10:38MIT License