Filter Queries

Found 1018 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
901 Columns with exact/floating numeric types have textual default values The default value of a column should belong to the type of the column. The system shouldn't conduct unnecessary type casts. Problem detection INFORMATION_SCHEMA only 2025-11-07 10:11 MIT License View
902 Too short table constraint names The names should be expressive. Find names of constraints, which are associated directly to a table, that are shorter than the length of the name of the table + two characters. Problem detection system catalog base tables only 2025-11-07 10:11 MIT License View
903 Names of triggers and rules that do contain the table name The names should contain table name in order to make the names better understandable. General INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View
904 Names of triggers and rules that do not contain the table name The names should contain table name in order to make the names better understandable. Problem detection INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View
905 Different prefixes of a candidate key column and a referencing foreign key column The naming must be consistent. Find foreign key constraints where the candidate key column and foreign key column names have different prefixes. Thus, for instance, one cannot use USING syntax for joining the tables. Problem detection system catalog base tables only 2025-11-07 10:11 MIT License View
906 Different suffixes of a candidate key column and a referencing foreign key column The naming must be consistent. Find foreign key constraints where the candidate key column and foreign key column names have different suffixes. Thus, for instance, one cannot use USING syntax for joining the tables. Problem detection system catalog base tables only 2025-11-07 10:11 MIT License View
907 Names of columns with the type BOOLEAN The naming of BOOLEAN columns must be consistent. For the better readability the names of such columns could have prefix "is_" (in English) or "on_" (in Estonian) General INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View
908 Columns with BOOLEAN type that do not have a good name The phrase "is_" or "has_" or "can_" (in English) or "on_" (in Estonian) should be used in the name - preferably in the beginning. Worse: agreed, kinnitatud. Better: contract_is_agreed, leping_on_kinnitatud. Perhaps the best: is_contract_agreed or is_agreement, on_leping_kinnitatud, on_kinnitatud. Problem detection INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View
909 Cannot accommodate all the fractional seconds in case of table columns The precision of a timestamp type of a column must be able to accommodate all the fractional seconds of the default value of the column. Find table columns with the type timestamp without time zone(m) or timestamp with time zone(m) that have a default value LOCALTIMESTAMP(n) or CURRENT_TIMESTAMP(n) WHERE n>m. Problem detection INFORMATION_SCHEMA only 2025-11-07 10:11 MIT License View
910 Columns with BOOLEAN type that do have a good name The prefic of the name should be "is_" or "has_" or "can_" (in English) or "on_" (in Estonian). Worse: agreed, kinnitatud. Better: is_agreement, on_kinnitatud. General INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View
911 Routines with BOOLEAN return type that do not have a good name The prefic of the name should be "is_" or "has_" or "can_" (in English) or "on_" (in Estonian). Worse: check_rights. Better: has_rights. Problem detection INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View
912 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 2025-11-07 10:11 MIT License View
913 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 2025-11-07 10:11 MIT License View
914 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 2025-11-07 10:11 MIT License View
915 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 2025-11-07 10:11 MIT License View
916 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 2025-11-07 10:11 MIT License View
917 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 2025-11-07 10:11 MIT License View
918 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 2025-11-07 10:11 MIT License View
919 Cycle in a hierarchy There should not be cycles in hierarchies meaning that the parent must always be specified. In this case a parent must reference to a child or to itself, otherwise it cannot be registered. Problem detection system catalog base tables only 2025-11-07 10:11 MIT License View
920 PL/pgSQL functions without the RETURN clause The return value of a function cannot be left undefined. If control reaches the end of the top-level block of the function without hitting a RETURN statement, a run-time error will occur. This restriction does not apply to functions with output parameters and functions returning void, however. In those cases a RETURN statement is automatically executed if the top-level block finishes. It also does not apply to trigger functions that only task is to raise an exception. Problem detection INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View