Catalog of PostgreSQL queries for finding information about a PostgreSQL database and its design problems

AND
AND
AND
ANDFrom where does the query gets its information?
AND
AND

There are 961 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
261Check as to wheteher the names of tables are in the plural or in the singular form (English version) (aggregate view)Check as to wheteher the names of tables are in the plural or in the singular form. Make sure that you are consistent in naming. Show the number of tables that name is in plural or in singular by table type.Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-01-16 01:09MIT License
262Check as to wheteher the names of tables are in the plural or in the singular form (Estonian version)Check as to wheteher the names of tables are in the plural or in the singular form. Make sure that you are consistent in naming.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-16 01:09MIT License
263CHECK constraint cardinality is zeroWrite correct constraints. Usually the constraint expression should refer to at least one column. A domain constraint expression should refer to the stub VALUE. For instance, the constraint CHECK(1=0) that is associated with a table T would prevent adding any rows to T. The value of the Boolean expression of this constraint is always FALSE.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-04-22 17:06MIT License
264CHECK constraints that perhaps do not consider 'infinity' and '-infinity' special valuesFind 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.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-08 19:03MIT License
265CHECK constraints that perhaps incorrectly consider 'infinity' and '-infinity' special valuesSuch special values belong to the types DATE, TIMESTAMP, NUMERIC, REAL, and DOUBLE PRECISION. No value can be bigger than infinity or smaller than -infinity. If the check constraint cheks that a value must be bigger than -infinity or smaller than infinity, then it does not restrict (almost) anything.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-12-07 20:13MIT License
266CHECK constraints with IS NULLFind CHECK constraints to one column (associated with a base table directly or through domain) that check that the value is missing (IS NULL). Write as simple constraint definitions as possible. By default columns are optional, i.e., they permit NULLs. NULL in a column means that checking of a CHECK constraint on the column results with UNKNOWN. CHECK constraints permit rows in case of which checking results with TRUE or UNKNOWN. In case of a CHECK constraint there is no need to check separately that a value in the column could be missing, i.e., be NULL. Thus, for instance, instead of writing CHECK (price>0 OR price IS NULL) write CHECK (price>0).Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
267CHECK constraint with pattern matching on non-textual columnsFind base table and foreign table columns that do not have a textual type but have a single-column check constraint that uses pattern matching. The use of a regular expression, a LIKE clause, or a SIMILAR TO clause in order to constrain values in a non-textual column points to the incorrect selection of operator or column data type.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
268CHECKs are associated with a column instead of the domain of the columnFind simple check constraints (involve one column) that are associated with a base table column instead of the domain of the column. Common checks of data in columns that share the same domain should be described at the level of domain not at the level of columns.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
269Coalesce/Concat need at least two argumentsFind user-defined routines and derived tables (views/materialized views) that have a subquery that contain an invocation of Coalesce or Concat function with just one argument. You should use the Coalesce and Concat functions correctly by invoking these with at least two arguments. If one invokes these functions with one argument, then the functions will return the input value.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-12-08 11:49MIT License
270Column name contains the table nameFind columns that have the same name as the table. The names may have different uppercase/lowercase characters. Make sure that the naming style is consistent.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-06 12:38MIT License
271Column name is the same as the table nameFind columns that have the same name as the table. The names may have different uppercase/lowercase characters. Sometimes columns with such names are used as the key columns. Make sure that the naming style is consistent.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-06 12:38MIT License
272Columns defined in a subtableFind columns that have been added to a subtable, i.e., these were not defined in its immediate supertable.GeneralINFORMATION_SCHEMA+system catalog base tables2021-01-02 03:22MIT License
273Columns of base tables that hold truth values but do not have a default value (non-Boolean columns)Find non-foreign key columns of base tables that probably (based on the column name) contain values that represent truth values but do not have a default value. There are only two truth values - TRUE and FALSE - in case of two-valued logic. It could be possible to select one of these as the default value in case of the columns.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-20 14:08MIT License
274Columns of base tables that hold truth values but do not restrict the permitted values (non-Boolean columns)Find non-foreign key columns of base tables that probably (based on the column name) contain values that represent truth values but do not have a have a check constraint. The constraint should restrict the permitted values with values that represent truth values TRUE and FALSE.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-20 14:07MIT License
275Columns of base tables that hold truth values that do not have a default value although they could have it (non-Boolean columns)Find columns of base tables that do not have type BOOLEAN but are used to record Boolean values. Based on column names these implement a state machine or record agreements. At the same time the columns do not have a default value. There are only two truth values - TRUE and FALSE - in case of two-valued logic. It should be possible to select one of these as the default value of the column.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-09 16:40MIT License
276Columns that have the same name as some domain/typeUse different names to avoid confusion.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-28 14:47MIT License
277Columns that have the same name as their domain/typeFind the columns that name is the same as the name of the type of the column or the domain of the column.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-30 13:04MIT License
278Columns with array or user-defined typeFind columns with an array or a user-defined type. Each columns should have the most appropriate data type.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-19 17:04MIT License
279Columns with BOOLEAN type that do have a good nameThe prefic of the name should be "is_" or "has_" or "can_" (in English) or "on_" (in Estonian). Worse: agreed, kinnitatud. Better: is_agreement, on_kinnitatud.GeneralINFORMATION_SCHEMA+system catalog base tables2024-01-03 09:56MIT License
280Columns with BOOLEAN type that do not have a good nameThe phrase "is_" or "has_" or "can_" (in English) or "on_" (in Estonian) should be used in the name - preferably in the beginning. Worse: agreed, kinnitatud. Better: contract_is_agreed, leping_on_kinnitatud. Perhaps the best: is_contract_agreed or is_agreement, on_leping_kinnitatud, on_kinnitatud.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-03 09:56MIT License