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
661 All system-defined TOAST-able types Find system-defined types in case of which the system can use the TOAST technique, i.e., save the value in a compressed form or store it in a automatically-created secondary table, which is hidden from the database user (TOAST table). General system catalog base tables only 2020-11-06 14:51 MIT License View
662 Perhaps an overcomplicated constraint expression that compares the result of a Boolean expression with a Boolean value Find table and domain CHECK constraints that compare the result of a Boolean expression with a Boolean value. If you can choose between two logically equivalent Boolean expressions choose the more simple expression. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-12-30 11:57 MIT License View
663 CHECK constraints are inconsistent with DEFAULT values Find table CHECK constraints that involve two columns that have the same default value. However the constraint assumes that the values must be unequal or one value must be bigger than another. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-11-30 09:58 MIT License View
664 Permitting in a column only empty strings and strings that consist of whitespace characters Find table CHECK constraints that permit in a column only empty strings or strings that consist of only whitespace characters. Problem detection INFORMATION_SCHEMA only 2021-12-19 15:10 MIT License View
665 Perhaps an unnecessary default value (the empty string or a string that consists of only whitespace) of a base table column/domain Find table columns and domains with the default value that is the empty string or a string that consists of only whitespace (for instance, newlines, spaces). Problem detection INFORMATION_SCHEMA only 2021-03-20 11:42 MIT License View
666 CHAR or VARCHAR columns have a default value that length is longer from the character maximum length of the column Find table columns with CHAR or VARCHAR type that have a default value that length is longer from the character maximum length of the column. Choose a suitable data type, field size, and default value. If the value is longer, then it is impossible to register it in a field, i.e., it makes registration of data impossible (except if the excessive characters are spaces). Problem detection INFORMATION_SCHEMA only 2022-10-31 10:19 MIT License View
667 Inconsistency between the type and the default value of a column (date and timestamp values) Find table columns with timestamp/date types that data type and dynamically found default value have a different type. Problem detection INFORMATION_SCHEMA only 2021-02-25 17:29 MIT License View
668 Inconsistency between the type and the default value of a column (time values) Find table columns with time types, which data type and dynamically found default value have a different type. Problem detection INFORMATION_SCHEMA only 2021-02-25 17:29 MIT License View
669 Too generic names (table constraints) Find table constraints (constraints that are associated directly with the table) that have too generic names like "key" or the name contain too generic words like "data" (all constraints restrict data in the table), or the name is an abbreviation of a constraint type name. Problem detection system catalog base tables only 2025-05-05 07:02 MIT License View
670 A non-parameterized table function instead of a view Find table functions that do not have any parameters. Prefer simpler and more portable solutions. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-11-03 21:16 MIT License View
671 Table functions with OFFSET Find table functions that use OFFSET. OFFSET method is a common way for implementing pagination. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-11-09 12:13 MIT License View
672 A table has the same name as a routine Find table names that are the same as some routine name. Use different names to avoid confusion. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:30 MIT License View
673 Grantable table privileges Find table privileges that the carrier of the privilege can in turn grant to others, i.e., the privileges have been given WITH GRANT OPTION. The number of privileges that can be passed on should be as small as possible. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-01-07 13:43 MIT License View
674 Table, routine, and usage privileges that have been granted to a superuser Find table, routine, and usage privileges that have been granted to a superuser. Superuser can do anything in the database and thus does not need the privileges. The result is a sign that perhaps the executed GRANT statements were incorrect (wrong username) or the grantee later got superuser status (that it shouldn't have). Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:30 MIT License View
675 One true lookup table Find tables that contain all (or most) of the classifier values and tables that refer to these. Problem detection system catalog base tables only 2021-02-25 17:29 MIT License View
676 Table has both state and status columns Find tables that contain both a state and a status column. General INFORMATION_SCHEMA+system catalog base tables 2023-01-14 15:26 MIT License View
677 Table has multiple columns for free-form descriptions Find tables that contain multiple columns for free-form textual descriptions. Make sure that the names of columns are understandable and sufficiently different. Make sure that there are no duplicate columns. General INFORMATION_SCHEMA+system catalog base tables 2023-01-14 15:36 MIT License View
678 Small tables Find tables that have one column or zero columns. General INFORMATION_SCHEMA+system catalog base tables 2021-03-07 10:52 MIT License View
679 Name and description maximum length Find tables where is both a column for registering name and description. Find the permitted maximum field size in these columns. Take into account that the maximum length may be controlled by using a CHECK constraint. Make sure that the permitted maximum field sizes are sufficiently different. General INFORMATION_SCHEMA+system catalog base tables 2021-02-24 20:36 MIT License View
680 Trigger is used to enforce referential integrity Find tables where user-defined (non-system) triggers are used to implement referential integrity. In addition to table name show the triggers and the number of triggers. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:30 MIT License View