| Goal | Find check constraints of base tables that cover exactly one column where the default value of the column is special value 'infinity' or '-infinity'. Find only such constraints that probably check a range of permitted values but do not consider that one of the values might be 'infinity' or '-infinity'. Such special values belong to the types DATE, TIMESTAMP, NUMERIC, REAL, and DOUBLE PRECISION. |
|---|---|
| Notes | The query considers constraints and default values that are connected directly to the table as well as constraints and default values that are connected to the table through a domain. The query takes into account the possibility that NOT isfinite(..) expression could be used to check the infinity value. |
| Type | Problem detection (Each row in the result could represent a flaw in the design) |
| Reliability | Medium (Medium number of false-positive results) |
| License | MIT (opens in new tab) |
| Data Source | INFORMATION_SCHEMA+system catalog |
| SQL Query |
|
Collections
This query belongs to the following collections:
Find problems automatically
Queries, that results point to problems in the database. Each query in the collection produces an initial assessment. However, a human reviewer has the final say as to whether there is a problem or not .
| Name | Description |
|---|---|
| Find problems automatically | Queries, that results point to problems in the database. Each query in the collection produces an initial assessment. However, a human reviewer has the final say as to whether there is a problem or not . |
Categories
This query is classified under the following categories:
CHECK constraints
Queries of this category provide information about CHECK constraints.
Data types
Queries of this category provide information about the data types and their usage.
Default value
Queries of this catergory provide information about the use of default values.
| Name | Description |
|---|---|
| CHECK constraints | Queries of this category provide information about CHECK constraints. |
| Data types | Queries of this category provide information about the data types and their usage. |
| Default value | Queries of this catergory provide information about the use of default values. |
Further reading and related materials: