Filter Queries

Found 997 queries.

  • All the queries about database objects contain a subcondition to exclude from the result information about the system catalog.
  • Although the statements use SQL constructs (common table expressions; NOT in subqueries) that could cause performance problems in case of large datasets it shouldn't be a problem in case of relatively small amount of data, which is in the system catalog of a database.
  • Statistics about the catalog content and project home in GitHub that has additional information.

# Name Goal Type Data source Last update License
501 Incorrect reference to a system-defined function in the routine body Find 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 detection INFORMATION_SCHEMA+system catalog base tables 2021-10-25 16:48 MIT License View
502 Incorrect specification of logical or in regular expressions Find the use of regular expressions where logical or is incorrectly specified, i.e., (| or |). Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-11-24 12:07 MIT License View
503 Incorrect suffix of a constraint name or an index name If 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 detection INFORMATION_SCHEMA+system catalog base tables 2024-12-28 10:44 MIT License View
504 Incorrect use of non-deterministic functions in CHECK constraints Do 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 detection INFORMATION_SCHEMA only 2024-11-22 15:29 MIT License View
505 INFORMATION_SCHEMA is missing Make 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 detection INFORMATION_SCHEMA+system catalog base tables 2022-12-07 19:07 MIT License View
506 Initially deferred constraint triggers with unnecessary locking Initially deferred constraint triggers do not need explicit statements for locking tables or rows. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-10-08 11:25 MIT License View
507 Input 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 detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:30 MIT License View
508 Input parameters with the same name have different types Find 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 detection INFORMATION_SCHEMA+system catalog base tables 2024-01-24 15:01 MIT License View
509 Insufficient number of user-defined base tables There must be at least n (seven in this case) user-defined base tables in the database. Problem detection INFORMATION_SCHEMA only 2021-02-25 17:30 MIT License View
510 Insufficient number of user-defined domains There 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 detection INFORMATION_SCHEMA only 2021-02-25 17:30 MIT License View
511 Insufficient number of user-defined foreign tables There must be at least n (two in this case) user-defined foreign tables in the database. Problem detection INFORMATION_SCHEMA only 2021-02-25 17:30 MIT License View
512 Insufficient number of user-defined non-trigger routines There must be at least n (four in this case) user-defined non-trigger routines in the database. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:30 MIT License View
513 Insufficient number of user-defined triggers+rules There 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 detection INFORMATION_SCHEMA+system catalog base tables 2024-01-04 11:47 MIT License View
514 Insufficient 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 detection INFORMATION_SCHEMA+system catalog base tables 2024-01-04 11:46 MIT License View
515 Insufficient number of user-defined views There must be at least n (four in this case) user-defined views in the database. Problem detection INFORMATION_SCHEMA only 2021-02-25 17:30 MIT License View
516 Insufficient routine privileges You must give rights to use routines to the users/roles that correspond to applications. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:29 MIT License View
517 Insufficient view privileges You must give privileges to use views to the users/roles that correspond to applications Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:29 MIT License View
518 Invalid character class PostgreSQL regular expressions do not have character classes word and letter. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-11-04 12:50 MIT License View
519 Invalid use of the case insensitive search modifier in regular expressions Find 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 detection INFORMATION_SCHEMA+system catalog base tables 2021-11-04 16:06 MIT License View
520 Invocation of a system-defined routine without providing any arguments Find 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 detection INFORMATION_SCHEMA+system catalog base tables 2023-12-22 13:00 MIT License View