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...
1Address field size is incorrect (too short or too long)Find base table columns that are meant for recording different types of addresses where the filed size does not take into account the possible maximum length.Problem detectionINFORMATION_SCHEMA only2023-11-09 12:55MIT License
2All CHECK constraints of domains that are not associated with any tableFind all CHECK constraints (except NOT NULL) of domains that are not associated with any column.GeneralINFORMATION_SCHEMA only2020-11-06 14:51MIT License
3All column DEFAULT valuesFind all the default values of base table, view, and foreign table columns.GeneralINFORMATION_SCHEMA only2022-10-31 10:18MIT License
4All column dynamic DEFAULT values values that do not invoke a sequenceFind 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.GeneralINFORMATION_SCHEMA only2021-11-15 15:57MIT License
5All columns of a base table have a default valueFind base tables where all the columns have a default value.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
6All column static DEFAULT valuesFind all columns that have a static default value, i.e., the value is not returned by a function.GeneralINFORMATION_SCHEMA only2021-11-15 15:57MIT License
7All domain default valuesFind domains that specify a default values and columns that are defined based on the domain. Make sure that there are no unsuitable default values.GeneralINFORMATION_SCHEMA only2021-01-19 13:04MIT License
8All domainsFind all domains.GeneralINFORMATION_SCHEMA only2020-11-10 11:49MIT License
9All foreign tablesFind all foreign tables.GeneralINFORMATION_SCHEMA only2020-11-06 15:20MIT License
10All table CHECK constraints that cover at leat one columnFind all CHECK constraints (except NOT NULL) that are associated with a base table or a foreign table column. It is useful to enforce as many constraints at database level as possible. In this way one improves data quality as well as gives extra information to the database users (including the DBMS engines, development environments, and applications).GeneralINFORMATION_SCHEMA only2024-01-01 11:27MIT License
11All the non-primary key columns are optionalFind base tables where all he non-primary key columns are optional. Avoid too many optional columns. You have to be extra careful with NULLs in case of formulating search conditions of data manipulation statements.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
12All updatable viewsFind all views through which it is possible to modify data in base tables. Is_insertable_into and is_updatable show as to whether the view is naturally updatable in PostgreSQL or has associated rules that make sure that INSERT/UPDATE/DELETE operations against the view will not cause an error. Please note that the rule could be DO INSTEAD NOTHING rule, i.e., data modification through the view does not cause an error but the data is not actually modified. If the updatability is achieved due to rules, then is_updatable=YES if the view has both UPDATE and DELETE rule that make sure that UPDATE and DELETE operations do not cause an error.GeneralINFORMATION_SCHEMA only2024-01-14 17:09MIT License
13All user schemasFind all the schemas in the database that are not used for the system purposes.GeneralINFORMATION_SCHEMA only2022-11-04 15:14MIT License
14Base table column name is the same as its domain nameFind base table columns that have the same name as the domain name or the data type name of the column. The names may have different uppercase/lowercase characters. Columns, domains, and types are different concepts in SQL and perhaps it is better to use different names in case of these.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
15Base table column of comments/descriptions has an incorrect data type or maximum character lengthFind base table columns that name refers to the possibility that these are used to register comments/descriptions. Find the columns where the data type is not VARCHAR and TEXT or in case of VARCHAR the maximum number of permitted characters is smaller than 1000. In case of determining field sizes choose a size that permits registration of all possible legal values.Problem detectionINFORMATION_SCHEMA only2022-05-01 13:39MIT License
16Base table column of measurements does not have a correct data typeFind base table columns that name refers to the possibility that these are used to register measurement results. Find the columns that do not have an integer or numeric type.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
17Base table column of national identification numbers does not have a correct data typeFind non-textual base table columns that name refers to the possibility that these are used to register national identification numbers (personal codes). The codes can contain additional symbols to numbers.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
18Base table column of national identification numbers has a too short field sizeFind base table columns with VARCHAR type that name refers to the possibility that these are used to register national identification numbers (personal codes). Find the columns where the field size is shorter than 20.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
19Base table column of personal names has questionable propertiesFind base table columns that name refers to the possibility that these are used to register personal names. Although there are very long personal names the general approach is to register a shortened version of these. Thus, a large field size is not a good idea because it would cause usability and security problems. There are persons who only have one name (mononymous persons). Database design must take it into account.Problem detectionINFORMATION_SCHEMA only2022-10-29 20:35MIT License
20Base table column of quantities does not have a numeric type (based on column names)Find base table columns that name refers to the possibility that these are used to register quantities of things. Find the columns that do not have a numeric type.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License