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 reference to a system-defined function in the routine bodyFind user-defined routines that possibly use incorrect name of a system-defined function (currenttimestamp (correct is current_timestamp), currentdate (correct is current_date), currenttime (correct is current_time), local_time (correct is localtime), local_timestamp (correct is localtimestamp),localdate (there is no such function),local_date (there is no such function), sessionuser (correct is session_user), ucase (correct is upper), lcase (correct is lower)). The problem can arise only if the routine uses dynamic SQL. In case of static SQL the DBMS checks the SQL statemen at the creation time and finds out that for instance, SELECT Count(*) AS cnt FROM Emp WHERE hiredate<=currentdate; is incorrect statement because currentdate is not a function name and there is no column currentdate in the table Emp.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-10-25 16:48MIT License
422Incorrect specification of logical or in regular expressionsFind the use of regular expressions where logical or is incorrectly specified, i.e., (| or |).Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-24 12:07MIT License
423Incorrect 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
424Incorrect use of non-deterministic functions in CHECK constraintsDo not create a constraint in case of which data that satisfied a constraint c at the registration time suddenly does not satisfy it any more as the time goes by. Find all the check constraints that use non-deterministic functions (now, current_timestamp, localtimestamp, current_date, current_time) in a way that makes this situation possible. Fort instance, localtimestamp(0)>end_date is an example of such constraint.Problem detectionINFORMATION_SCHEMA only2023-11-29 14:59MIT License
425Index FILLFACTOR has been changedFind all indexes where FILLFACTOR is not the default. The default is different in case of different index types is different. In case of B-tree indexes the default is 90.Generalsystem catalog base tables only2022-11-02 10:58MIT License
426INFORMATION_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
427Initially 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
428Input 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
429Input 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
430Installed extensionsTry 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
431Insufficient number of user-defined base tablesThere must be at least n (seven in this case) user-defined base tables in the database.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
432Insufficient number of user-defined domainsThere must be at least n (one in this case) user-defined domains in the database each of that must be used in case of at least two columns of base tables.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
433Insufficient number of user-defined foreign tablesThere must be at least n (two in this case) user-defined foreign tables in the database.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
434Insufficient 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
435Insufficient 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
436Insufficient 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
437Insufficient number of user-defined viewsThere must be at least n (four in this case) user-defined views in the database.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
438Insufficient 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
439Insufficient 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
440Invalid character classPostgreSQL regular expressions do not have character classes word and letter.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 12:50MIT License