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
401 Exclude constraint instead of simple UNIQUE Find exclude constraints that implement a simple UNIQUE constraint. The checking might be slower compared to UNIQUE constraint. Problem detection system catalog base tables only 2021-02-25 17:30 MIT License View
402 Length and char_lenfgth functions are used within the same expression Find expressions that refer to both length and char_length functions. Make sure that the expression is correct. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-11-09 13:44 MIT License View
403 The usage of data type formatting functions Find expressions that use a data type formatting function - to_char, to_number, to_date, to_timestamp. General INFORMATION_SCHEMA+system catalog base tables 2024-12-25 19:57 MIT License View
404 Regular expression with possibly a LIKE pattern Find expressions that use a regular expression with a like predicate pattern. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-10-21 11:11 MIT License View
405 LIKE with a regular expression pattern Find 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 detection INFORMATION_SCHEMA+system catalog base tables 2023-10-21 10:38 MIT License View
406 LIKE instead of = Find expressions that use LIKE predicate for precise comparison. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-11-09 10:43 MIT License View
407 LIKE without a pattern with % or _ Find expressions that use LIKE predicate witout a pattern that contains at least one % or _ sign. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:30 MIT License View
408 No need to use to_date or to_timestamp function Find expressions where a date literal with the ISO format is converted to date/timestamp by using to_date or to_timestamp function. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:29 MIT License View
409 Extension routines in the schema "public" Find extensions that routines are in the schema public. Problem detection system catalog base tables only 2025-06-27 13:01 MIT License View
410 Prefixes in the names of database objects Find for different types of database objects all the prefixes that are used in different names. One should be consistent in naming, including in the use of prefixes. If you use prefix in the name of a database object, then it could refer to the type of the database object. Do not use different prefixes in the names of database objects that have the same type. General INFORMATION_SCHEMA+system catalog base tables 2024-12-21 16:22 MIT License View
411 Vacuum and analyze status of base tables Find for each base table the last time when the table has been vacuumed or analyzed (either manually or automatically). General system catalog base tables only 2023-10-06 13:48 MIT License View
412 Coverage by derived tables Find for each base table the list of derived tables (both views and materialized views) that refer to the base table. If the database is used through the public database interface (virtual data layer), then, ideally, each table is referred from the subquery of at least one derived table. General INFORMATION_SCHEMA+system catalog base tables 2023-11-11 09:31 MIT License View
413 Coverage by routines that have the SQL-standard body Find for each base table the list of routines (functions and procedures) that refer to the base table. If the database is used through the public database interface (virtual data layer), then, ideally, each table is referred from at least one routine. General INFORMATION_SCHEMA+system catalog base tables 2021-11-05 17:00 MIT License View
414 Usage of base tables Find for each derived table the list of base tables that are used by the derived table. General INFORMATION_SCHEMA+system catalog base tables 2024-01-14 00:50 MIT License View
415 Domain usage in base tables Find for each domain the number of usages in base tables. The less you have managed to reuse domains in case of different columns, the more you have wasted your time by creating the domains. General INFORMATION_SCHEMA only 2020-11-06 14:51 MIT License View
416 The number of SQL-language routines with different types of bodies Find for each user schema that contain a SQL-language routine how many of these have the body that is string literal and how many have the body (possible starting from PostgreSQL 14) that is parsed at the routine definition time. Try to be consistent, i.e., use the same solution in case of all the routines. Sofware measure INFORMATION_SCHEMA+system catalog base tables 2022-12-02 11:33 MIT License View
417 Number of underlying tables of derived tables Find for each view or materialized view the number of tables based on which the derived table has been directly defined. These tables could be base tables or derived tables. Sofware measure INFORMATION_SCHEMA+system catalog base tables 2023-11-11 09:30 MIT License View
418 Unused foreign data wrappers Find foreign data wrappers that do not have any associated foreign servers. Problem detection INFORMATION_SCHEMA only 2021-02-25 17:30 MIT License View
419 Foreign key columns that are associated with a sequence generator Find foreign key columns that are associated with a sequence generator. Foreign key values are selected amongst the values that are registered as corresponding primary key/unique key values. Values in the foreign key columns are not directly generated by the system. These values might be system generated indirectly - generated when a row is added to the primary (parent) table. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-03-08 00:42 MIT License View
420 Foreign key column has a simple check constraint that is attached directly to the table Find foreign key columns that are covered by a simple check constraint, i.e., the constraint involves only one column. Look only constraints that are directly associated with the table, i.e., are not specified through a domain. Perhaps the constraint should be defined on the referenced candidate key column. Problem detection system catalog base tables only 2021-02-25 17:29 MIT License View