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...
681Too generic names (tables)Find the names of tables that are too generic. In SQL databases data/information is represented as values in columns. It is not a good style to use generic names like table, data, information, list etc. in the names of tables.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-07 20:37MIT License
682Name starts or ends with spacesFind the names of user-defined database objects (must be delimited identifiers) that start or end with spaces.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-17 10:03MIT License
683Derived table names have prefix or suffixFind the names of views and materialized views that have prefix or suffix. Follow the same naming style as in case of base tables (derived tables are also tables). Thus, if base tables do not have prefixes or suffixes, then derived tables shouldn't have these as well.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
684Consistency of using generic column names in candidate key columns that are not foreign key columnsFind the names on base table columns that are a part of a candidate key but not a foreign key and contain a generic word (nimi, nimetus, kommentaar, kirjeldus, name, comment, description, etc.). Make sure that naming of these is consistent, i.e., such names always contain the table name or never contain the table name.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 20:53MIT License
685Consistency of using generic column names in non-candidate key columns that are also not foreign key columnsFind the names on base table columns that are not a part of a candidate key and a foreign key and contain a generic word (nimi, nimetus, kommentaar, kirjeldus, name, comment, description, etc.). Make sure that naming of these is consistent, i.e., such names always contain the table name or never contain the table name.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 20:53MIT License
686Gratuitous context in the names of non-foreign key and non-candidate key columnsFind the names on base table columns that are not a part of a candidate key and a foreign key and that contain the name of the table. Exclude very general column names (for instance, nimi, nimetus, kommentaar, kirjeldus, name, comment, description). In case of these using the table name in the column name is not a problem because it simplifies writing the queries based on the tables. In this case one does not have to rename the columns in the query result.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-15 13:39MIT License
687The same name is used in different contexstsFind the names that are used in case of different types of elementsProblem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-17 10:33MIT License
688User-defined non-trigger SQL and PL/pgSQL routinesFind the non-trigger SQL and PL/pgSQL routines in non-systemic schemas.GeneralINFORMATION_SCHEMA+system catalog base tables2021-12-23 02:40MIT License
689The number and percentage of base tables where all the non-primary key columns are optionalFind the number and percentage of base tables where all the non-primary key columns are optionalSofware measureINFORMATION_SCHEMA only2020-11-08 19:57MIT License
690The number and percentage of optinal columns in base tablesFind the number and percentage of optinal columns in base tablesSofware measureINFORMATION_SCHEMA only2020-11-08 21:17MIT License
691The number of base table columns based on data typeFind the number of base table columns based on data type.Sofware measureINFORMATION_SCHEMA only2020-11-19 15:30MIT License
692The number of base table columns by type categoryFind the number of base table columns based on the category of data type that the columns have.Sofware measureINFORMATION_SCHEMA only2021-03-20 12:27MIT License
693The proportion of using different integer types as types of base table columnsFind the number of base table columns that use different integer types (SMALLINT, INTEGER, BIGINT) and their proportion from the overall set of columns that use an integer type.Sofware measureINFORMATION_SCHEMA only2021-03-03 12:41MIT License
694Number of tables covered by derived tablesFind the number of base tables, the number of base tables that are referred from at least one derived table (view or materialized view), the number of base tables that are referred from at least one view, and the number of base tables that are referred from at least one materialized view. If the database is used through the public database interface (virtual data layer), then, ideally, each table is referred from the subquery of at least one derived table.Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-11-11 09:33MIT License
695The number of commented routinesFind the number of commented routines based on the way how the comments have been added (as a COMMENT object or as a comment in the routine body).Sofware measureINFORMATION_SCHEMA+system catalog base tables2024-01-14 20:49MIT License
696The number of compensating actions of foreign key constraintsFind the number of compensating actions that are specified in case of foreign key constraints.Sofware measuresystem catalog base tables only2020-11-16 10:11MIT License
697The number of constraints by schema, by type, and in totalFind the number of constraints in different schemas. The number of constraints in a database gives an indication about the state of enforcing constraints at the database level.Sofware measureINFORMATION_SCHEMA+system catalog base tables2020-11-06 14:51MIT License
698The number of derived table columns with an array, a user-defined, XML, JSON, or JSONB typeFind the number of derived table columns with json, xml, array, or user-defined types. Such columns may contain data that has been aggregated/composed based on values in base tables.Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-01-14 20:22MIT License
699Number of derived tables that aggregate dataFind the number of derived tables that aggregate data.Sofware measureINFORMATION_SCHEMA+system catalog base tables2024-01-14 12:33MIT License
700Different character maximum lengths that are used to define textual base table columnsFind the number of different character maximum lengths that are used to define textual base table columns as well as list all the different lengths. Show also the total number of columns with char/varchar type. Maximum character length constrains values in a column. Thus, in case there is a small number of used lengths, it raises a question as to whether the lengths have been optimally selected.Sofware measureINFORMATION_SCHEMA only2021-03-26 11:24MIT License