Filter Queries
Found 1056 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 the relatively small amount of data in the system catalog of a database.
#101. Inappropriate length constraints for address columns
INFORMATION_SCHEMA onlyThis query identifies base table columns designated for storing address components (e.g., IP addresses, emails, telephone numbers, or physical locations) that have inappropriate length constraints. It flags columns where the defined field size is either too strict or too loose compared to real-world data requirements. Operating on a heuristic basis, the query targets columns whose names imply address data (e.g., containing 'addr' or 'mail') but whose definitions fail to align with standard lengths. Highlighting both insufficient allocation (truncation risk) and unbounded allocation (data quality risk) helps ensure that these fields are sized according to domain standards, which is crucial for data integrity and usability.
#102. Inconsistency between the name and the type of a base table column (dates)
INFORMATION_SCHEMA onlyFind base table columns that name refers to the possibility that these are used to register dates. Find the columns that do not have an appropriate data type. Column names should reflect the data that is possible to record in the column. For instance, in case of temporal data the column name should indicate as to whether we record dates or timestamps. If the column data type is "date", then the suffix of the column name should be "kp" (Estonian) or "date" (English).
#103. Inconsistency between the name and the type of a base table column (timestamps)
INFORMATION_SCHEMA onlyFind base table columns that name refers to the possibility that these are used to register timestamps. Find the columns that do not have an appropriate data type. Column names should reflect the data that is possible to record in the column. For instance, in case of temporal data the column name should indicate as to whether we record dates or timestamps. If the column type is "timestamp", then the suffix of the column name should be "aeg" (Estonian) or "time" (English).
#104. Inconsistency between the type and the default value of a column (date and timestamp values)
INFORMATION_SCHEMA onlyFind table columns with timestamp/date types that data type and dynamically found default value have a different type.
#105. Inconsistency between the type and the default value of a column (time values)
INFORMATION_SCHEMA onlyFind table columns with time types, which data type and dynamically found default value have a different type.
#106. Inconsistent data types for audit timestamps
INFORMATION_SCHEMA onlyThis query checks whether columns used to record registration and last update times have inconsistent data types across the database. Using varying data types for these temporal columns (for example, mixing timestamp and timestamptz) can lead to unexpected timezone behaviors and complicate time-based calculations.
#107. Inconsistent data type usage in case of registering a date
INFORMATION_SCHEMA onlyFind as to whether there are multiple different types used in case of columns that are meant for registering dates.
#108. Inconsistent data type usage in case of registering a symbol
INFORMATION_SCHEMA onlyFind whether the database uses both CHAR(1) and VARCHAR(1) columns to register a single symbol.
#109. Inconsistent data type usage in case of registering sums of money
INFORMATION_SCHEMA onlyFind as to whether both the numeric type and integer types are used in case of columns that are meant for register data about prices.
#110. Inconsistent lengths in standard address columns
INFORMATION_SCHEMA onlyThis query checks whether columns storing standardized data—such as email addresses, phone numbers, IP addresses, postal codes, physical addresses, and file paths—have inconsistent field sizes across different tables. Identifying these discrepancies helps maintain a uniform database schema.
#111. Inconsistent means to calculate tsvector values
INFORMATION_SCHEMA onlyFind as to whether in the database there are multiple ways to calculate tsvector values, i.e., by using a generated column and by not using a generated column.
#112. Inconsistent naming of registration time columns
INFORMATION_SCHEMA onlyThis query checks whether timestamp columns used to record registration times are named consistently across different tables. Maintaining a uniform naming convention (such as always using created_at or reg_time) significantly improves schema readability and maintainability.
#113. Inconsistent naming of update time columns
INFORMATION_SCHEMA onlyThis query checks whether timestamp columns used to record last update times are named consistently across different tables. Using a uniform naming convention (such as consistently using updated_at or last_modified) significantly improves database schema readability and maintainability.
#114. Inconsistent precision and scale usage in case of registering sums of money
INFORMATION_SCHEMA onlyFind as to whether different precisions/scales are used in case of registering data about sums of money in different columns.
#115. Inconsistent time zone and precision usage in case of registering times
INFORMATION_SCHEMA onlyFind as to whether different data types (with and without timezone) and precisions are used in case of registering times in different columns.
#116. Inconsistent time zone and precision usage in case of registering timestamps
INFORMATION_SCHEMA onlyFind as to whether different data types (with and without timezone) and precisions are used in case of registering timestamps in different columns.
#117. Incorrect data type (based on default values)
INFORMATION_SCHEMA onlyFind columns of base tables that have the default value CURRENT_USER or SESSION_USER but the data type is CHAR or TEXT.
#118. Incorrect field size (based on default values)
INFORMATION_SCHEMA onlyThis query identifies a potential schema mismatch regarding data precision. It flags base table columns that default to CURRENT_USER or SESSION_USER but define a character length differing from the PostgreSQL standard identifier limit (typically 63 bytes, defined by NAMEDATALEN - 1).
Risk (Length < 63): Poses a hard runtime failure risk if a username exceeds the defined length. Inefficiency (Length > 63): Indicates imprecise modeling, as the stored value can technically never exceed the system limit.
#119. Incorrect field size (based on default values) (2)
INFORMATION_SCHEMA onlyThis query identifies potential schema discrepancies related to column sizing. It flags text columns in base tables where the static default value is unusually short—specifically, less than half the column's maximum allowed capacity.
#120. Incorrect prevention of the empty string or strings that consist of only spaces in a field
INFORMATION_SCHEMA onlyThis query identifies ineffectual CHECK constraints on base and foreign table columns that incorrectly attempt to prohibit empty or whitespace-only strings using the predicate trim(column_name) IS NOT NULL. Due to PostgreSQL's strict distinction between an empty string ('') and NULL, this check is a tautology; trim('') evaluates to '', and the condition '' IS NOT NULL is always true. The query finds these logically flawed constraints, which fail to provide any data validation and permit the insertion of the exact values they were intended to prevent.
| # | Name(activate to sort ascending) | Goal(activate to sort ascending) | Type(activate to sort ascending) | Data source(sorted ascending, activate to sort descending) | Last update(activate to sort ascending) | License | Actions |
|---|---|---|---|---|---|---|---|
| 101 | Inappropriate length constraints for address columns | This query identifies base table columns designated for storing address components (e.g., IP addresses, emails, telephone numbers, or physical locations) that have inappropriate length constraints. It flags columns where the defined field size is either too strict or too loose compared to real-world data requirements. Operating on a heuristic basis, the query targets columns whose names imply address data (e.g., containing 'addr' or 'mail') but whose definitions fail to align with standard lengths. Highlighting both insufficient allocation (truncation risk) and unbounded allocation (data quality risk) helps ensure that these fields are sized according to domain standards, which is crucial for data integrity and usability. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 102 | Inconsistency between the name and the type of a base table column (dates) | Find base table columns that name refers to the possibility that these are used to register dates. Find the columns that do not have an appropriate data type. Column names should reflect the data that is possible to record in the column. For instance, in case of temporal data the column name should indicate as to whether we record dates or timestamps. If the column data type is "date", then the suffix of the column name should be "kp" (Estonian) or "date" (English). | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 103 | Inconsistency between the name and the type of a base table column (timestamps) | Find base table columns that name refers to the possibility that these are used to register timestamps. Find the columns that do not have an appropriate data type. Column names should reflect the data that is possible to record in the column. For instance, in case of temporal data the column name should indicate as to whether we record dates or timestamps. If the column type is "timestamp", then the suffix of the column name should be "aeg" (Estonian) or "time" (English). | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 104 | 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 | MIT (opens in new tab) | View (opens in new tab) | |
| 105 | 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 | MIT (opens in new tab) | View (opens in new tab) | |
| 106 | Inconsistent data types for audit timestamps | This query checks whether columns used to record registration and last update times have inconsistent data types across the database. Using varying data types for these temporal columns (for example, mixing timestamp and timestamptz) can lead to unexpected timezone behaviors and complicate time-based calculations. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 107 | Inconsistent data type usage in case of registering a date | Find as to whether there are multiple different types used in case of columns that are meant for registering dates. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 108 | Inconsistent data type usage in case of registering a symbol | Find whether the database uses both CHAR(1) and VARCHAR(1) columns to register a single symbol. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 109 | Inconsistent data type usage in case of registering sums of money | Find as to whether both the numeric type and integer types are used in case of columns that are meant for register data about prices. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 110 | Inconsistent lengths in standard address columns | This query checks whether columns storing standardized data—such as email addresses, phone numbers, IP addresses, postal codes, physical addresses, and file paths—have inconsistent field sizes across different tables. Identifying these discrepancies helps maintain a uniform database schema. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 111 | Inconsistent means to calculate tsvector values | Find as to whether in the database there are multiple ways to calculate tsvector values, i.e., by using a generated column and by not using a generated column. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 112 | Inconsistent naming of registration time columns | This query checks whether timestamp columns used to record registration times are named consistently across different tables. Maintaining a uniform naming convention (such as always using created_at or reg_time) significantly improves schema readability and maintainability. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 113 | Inconsistent naming of update time columns | This query checks whether timestamp columns used to record last update times are named consistently across different tables. Using a uniform naming convention (such as consistently using updated_at or last_modified) significantly improves database schema readability and maintainability. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 114 | Inconsistent precision and scale usage in case of registering sums of money | Find as to whether different precisions/scales are used in case of registering data about sums of money in different columns. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 115 | Inconsistent time zone and precision usage in case of registering times | Find as to whether different data types (with and without timezone) and precisions are used in case of registering times in different columns. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 116 | Inconsistent time zone and precision usage in case of registering timestamps | Find as to whether different data types (with and without timezone) and precisions are used in case of registering timestamps in different columns. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 117 | Incorrect data type (based on default values) | Find columns of base tables that have the default value CURRENT_USER or SESSION_USER but the data type is CHAR or TEXT. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 118 | Incorrect field size (based on default values) | This query identifies a potential schema mismatch regarding data precision. It flags base table columns that default to CURRENT_USER or SESSION_USER but define a character length differing from the PostgreSQL standard identifier limit (typically 63 bytes, defined by NAMEDATALEN - 1). Risk (Length < 63): Poses a hard runtime failure risk if a username exceeds the defined length. Inefficiency (Length > 63): Indicates imprecise modeling, as the stored value can technically never exceed the system limit. |
Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 119 | Incorrect field size (based on default values) (2) | This query identifies potential schema discrepancies related to column sizing. It flags text columns in base tables where the static default value is unusually short—specifically, less than half the column's maximum allowed capacity. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 120 | Incorrect prevention of the empty string or strings that consist of only spaces in a field | This query identifies ineffectual CHECK constraints on base and foreign table columns that incorrectly attempt to prohibit empty or whitespace-only strings using the predicate trim(column_name) IS NOT NULL. Due to PostgreSQL's strict distinction between an empty string ('') and NULL, this check is a tautology; trim('') evaluates to '', and the condition '' IS NOT NULL is always true. The query finds these logically flawed constraints, which fail to provide any data validation and permit the insertion of the exact values they were intended to prevent. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) |