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...
21All identifying relationshipsFind all non-identifying relationships where the foreign key (a set of columns) is a subset of a uniqueness constraint (primary key, unique, or exclude constraint).Generalsystem catalog base tables only2023-11-01 11:32MIT License
22All key constraintsFind all the primary key and unique constraints of base tables.Generalsystem catalog base tables only2021-10-16 10:37MIT License
23All non-identifying relationshipsFind all non-identifying relationships where the foreign key (a set of columns) is not a subset of any uniqueness constraint (primary key, unique, or exclude constraint).Generalsystem catalog base tables only2023-11-01 11:31MIT License
24All non-unique indexesFind secondary indexes that have been created in the database.GeneralINFORMATION_SCHEMA+system catalog base tables2020-12-23 11:50MIT License
25All parameters with DEFAULT valuesFind parameters of user-defined routines that have a default value.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
26All partial indexesFind indexes to a subset of table rows.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
27All rulesFind user-defined rules for rewriting data manipulation language statements. Rules should be used only for the tasks that cannot be achieved in a declarative manner, i.e., for example, by declaring a constraint.Generalsystem catalog base tables only2023-12-22 12:30MIT License
28All security policiesFind all security policies.Generalsystem catalog base tables only2023-11-17 18:41MIT License
29All sequence generatorsFind all sequence generators.GeneralINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
30All short cycles (tables)Find pairs of tables that have both a foreign key that references to the other table. Such cycles can involve more than two tables but the query detects only cycles with two tables.GeneralINFORMATION_SCHEMA+system catalog base tables2021-11-27 20:54MIT License
31All supertablesFind all the base tables that serve as supertables in the inheritance hierarchiesSofware measuresystem catalog base tables only2021-03-14 17:07MIT License
32All system-defined TOAST-able typesFind 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).Generalsystem catalog base tables only2020-11-06 14:51MIT License
33All 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
34All table functionsFind all functions that return a set of rows.GeneralINFORMATION_SCHEMA+system catalog base tables2023-10-29 11:39MIT License
35All 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
36All unique keys have at least one optional columnFind base tables where all unique keys (sets of columns covered by a unique constraint, or a unique index) have at least one optional column. In this case there can be rows in the table where the values that should identify the row are missing. Because NULL is not a value and is not duplicate of another NULL the, follwing is possible: CREATE TABLE Uniq(a INTEGER NOT NULL,
b INTEGER,
CONSTRAINT ak_uniq UNIQUE (a, b));

INSERT INTO Uniq(a, b) VALUES (1, NULL);
INSERT INTO Uniq(a, b) VALUES (1, NULL);
Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-10-21 11:54MIT License
37All 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
38All user-defined TOAST-able typesFind user-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).Generalsystem catalog base tables only2020-11-06 14:51MIT License
39All user mappingsFind all user mappings for foreign servers and tablesGeneralsystem catalog base tables only2020-11-11 17:00MIT License
40All user schemasFind all the schemas in the database that are not used for the system purposes.GeneralINFORMATION_SCHEMA only2022-11-04 15:14MIT License