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...
301Patterns of the names of columns of simple primary keysFind the patterns of the names of columns of simple primary keys. Make sure that the naming is consistent. Ideally, the names should indicate as to whether the column is a surrogate or a natural key column. PostgreSQL 14 added primary keys, unique constraints, and foreign keys to system catalogs. Thus the query was modified to exclude the results from the system catalog.Generalsystem catalog base tables only2023-01-20 13:40MIT License
302Too generic names (foreign key columns)Find foreign key columns with the names like id, identifikaator, code, kood, number, etc. The names should have a prefix or a suffix that describes the nature of relationship with the referenced table or at least referes to the referenced table. These are too generic names.Problem detectionsystem catalog base tables only2023-01-20 12:37MIT License
303Too generic names (candidate key columns)Find candidate key columns with the names like id, identifikaator, code, kood, number, etc. The names should have a prefix or a suffix. These are too generic names.Problem detectionsystem catalog base tables only2023-01-20 12:35MIT License
304Comments of schemas, sequences, types, domains, domain constraints, and event triggersFind all the comments that have been added with a COMMENT statement to schemas, sequences, types, domains, and event triggers.Generalsystem catalog base tables only2023-01-19 15:04MIT License
305Too short or missing comments of derived tables and routinesFind views, materialized views, and user-defined routines that do not have a comment at all or the comment is shorter than twice the length of the object name, or the comment states that it is missing (TODO). You should give information to future developers and maintainers of the system (including the future version of yourself). Do not just repeat the name in the comment (with perhaps some rewording).Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-19 12:56MIT License
306Comments of non-derived tablesFind comments of non-derived tables (base tables, foreign tables, and partitioned tables) that are registered in the system catalog witht a COMMENT statement. Find also comments on their associated objects (columns, constraints, indexes, triggers, rules). Make sure that the comments give relevant, useful, and correct information.Generalsystem catalog base tables only2023-01-19 12:30MIT License
307Comments of derived tablesFind comments of derived tables (views and materialized views) that are registered in the system catalog witht a COMMENT statement. Find also comments on their associated objects (columns, triggers, rules). Make sure that the comments give relevant, useful, and correct information.Generalsystem catalog base tables only2023-01-19 12:14MIT License
308The generic names (columns) (aggregate view)(2)Find the number of too generic base table and view column names. Do not differentiate between base table and view columns to determine what name is generic.Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-01-18 16:42MIT License
309Check as to wheteher the names of tables are in the plural or in the singular form (English 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
310Check 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
311Check 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
312Check as to wheteher the names of parameters are in the plural or in the singular form (English version)Check as to wheteher the names of routine parameters 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:08MIT License
313The generic names (columns) (aggregate view)Find the too generic column names and the number of their occurrences.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-15 10:34MIT License
314Too generic names (columns)Find the names of columns that are too generic. In SQL databases data/information is represented as values in columns. It is not a good style to use generic words like data, information, column, etc. In the names of columns. Moreover, avoid too generic column names like: id, tyyp, kood, aeg, kp,type, code, time, date, fk, pk.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-15 10:33MIT License
315Base table columns with the same name have different typesFind base table columns that have the same name but different type. In general, base tables columns that have the same name should have the same type as well.Problem detectionINFORMATION_SCHEMA only2023-01-14 20:54MIT License
316Consistency 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
317Consistency 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
318Patterns of the names of PRIMARY KEY, UNIQUE, CHECK, EXCLUDE, and FOREIGN KEY constraints as well as user-defined non-unique indexes that are associated with exactly one columnFind patterns of the names of constraints and indexes. Make sure that the naming is consistent.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 20:52MIT License
319Patterns of the names of PRIMARY KEY, UNIQUE, CHECK, EXCLUDE, and FOREIGN KEY constraints as well as user-defined non-unique indexes that are associated with two or three columnsFind patterns of the names of constraints and indexes. Make sure that the naming is consistent.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 20:52MIT License
320Patterns of the names of triggers and rulesFind the patterns of the names of trigger and rule names. Make sure that the naming is consistent.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 20:51MIT License