Filter Queries

Found 1041 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
181 Range upper bound can be NULL This query identifies columns of base tables that use a RANGE data type but are configured to permit a NULL upper bound. This highlights ranges that can be "unbounded" on their ending side, which may be unintentional and could impact query logic and data constraints. Problem detection INFORMATION_SCHEMA+system catalog base tables 2025-11-07 12:03 MIT License View
182 Range upper bound is not restricted This query finds range columns of base tables that are missing a safety check on their ending value. It looks for columns where the end of the range can be set to any value, without rules to ensure that value makes sense. This helps ensure that all ranges have proper limits defined for their ending points. Problem detection INFORMATION_SCHEMA+system catalog base tables 2025-11-07 12:03 MIT License View
183 Range upper bound restriction dos not consider infinity This query identifies RANGE type columns in base tables that have a NOT NULL constraint on their upper bound and an additional CHECK constraint, but this check does not account for infinity. This may indicate a "magic number" problem, where a fixed upper limit (e.g., '2900-01-01') is used instead of the more explicit and semantically correct unbounded (infinity) value. Problem detection INFORMATION_SCHEMA+system catalog base tables 2025-11-07 12:03 MIT License View
184 Gratuitous context in the names of foreign key columns Find foreign key columns that name contains twice the name of the referenced (primary) table. Problem detection system catalog base tables only 2025-11-07 10:12 MIT License View
185 Gratuitous context in the names of parameters This query enforces a concise coding style by checking the names of parameters within routines (such as functions or procedures). It finds parameters whose names unnecessarily repeat the name of the routine they belong to. For example, in a function named calculate_invoice, a parameter named calculate_invoice_id would be flagged, as invoice_id is sufficient. A routine cannot have two parameters with the same name, so the shorter name is unambiguous within the context of the routine and results in cleaner, more readable code. Problem detection INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:12 MIT License View
186 Gratuitous context in the names of schema objects This query identifies schema objects with names that are redundantly prefixed with their own schema's name. It flags any object whose name begins with the schema name plus at least one other character. This enforces the design principle that a schema is a sufficient namespace, and therefore, objects within it do not require the additional, repetitive context in their own names. Problem detection system catalog base tables only 2025-11-07 10:12 MIT License View
187 A getter does not return a value Find user-defined SQL and PL/pgSQL routines that do not return a value although the name suggest that it should return a value (starts with "get"). Problem detection INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View
188 A large number of triggers Show user-defined triggers if there are more than 9 different trigger routine bodies, i.e., different triggers on different tables that do the same thing count as one trigger. General INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View
189 All CHECK constraints of domains that are not associated with any table Find all CHECK constraints (except NOT NULL) of domains that are not associated with any column. General INFORMATION_SCHEMA only 2025-11-07 10:11 MIT License View
190 All clustered indexes Find all tables that rows have been physically sorted based on an index. General system catalog base tables only 2025-11-07 10:11 MIT License View
191 All column DEFAULT values Find all the default values of base table, view, and foreign table columns. General INFORMATION_SCHEMA only 2025-11-07 10:11 MIT License View
192 All column dynamic DEFAULT values values that do not invoke a sequence Find all columns that have a dynamic default value, i.e., the value is returned by a function but the function is not for invoking a sequence. General INFORMATION_SCHEMA only 2025-11-07 10:11 MIT License View
193 All columns of a base table have a default value Find base tables where all the columns have a default value. Problem detection INFORMATION_SCHEMA only 2025-11-07 10:11 MIT License View
194 All column static DEFAULT values Find all columns that have a static default value, i.e., the value is not returned by a function. General INFORMATION_SCHEMA only 2025-11-07 10:11 MIT License View
195 All covering indexes Find all covering indexes, which include data from additional columns in leaf blocks. General INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View
196 All database privileges Find the privileges to use the database. c - CONNECT; C - CREATE; T - TEMPORARY. General system catalog base tables only 2025-11-07 10:11 MIT License View
197 All declaratively partitioned tables Find partitioned tables that have been implemented by using the declarative approach. Declarative partitioning is implemented in PostgreSQL starting from PostgreSQL 10. General INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View
198 All domain default values Find domains that specify a default values and columns that are defined based on the domain. Make sure that there are no unsuitable default values. General INFORMATION_SCHEMA only 2025-11-07 10:11 MIT License View
199 All domains Find all domains. General INFORMATION_SCHEMA only 2025-11-07 10:11 MIT License View
200 All enumerated types Find all enumerated types. General INFORMATION_SCHEMA+system catalog base tables 2025-11-07 10:11 MIT License View