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...
461Multiple selects from the same table in a routineCode should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of selecting different fields of the same row with different SELECT INTO statements one should try to do it with one statement.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 12:10MIT License
462Multiple simple keys with integer valuesFind base tables that have more than one primary key or unique constraints that involve exactly one integer column. Do not overcomplicate the database. Perhaps some column in the table is redundant.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-03 11:15MIT License
463Multiple updates of the same table in a routineCode should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of updating different fields of the same table with different UPDATE statements one should try to do it with one statement.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-24 13:59MIT License
464Name and description maximum lengthFind tables where is both a column for registering name and description. Find the permitted maximum field size in these columns. Take into account that the maximum length may be controlled by using a CHECK constraint. Make sure that the permitted maximum field sizes are sufficiently different.GeneralINFORMATION_SCHEMA+system catalog base tables2021-02-24 20:36MIT License
465Name contains only consonants and digitsFind names of database objects that contain only consonants and digits.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-18 16:13MIT License
466Name does not contain any vowelsFind names of database objects that do not contain any vowels.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-18 16:14MIT License
467Name does not contain any vowels (aggregate view)Find aggregate information about the names of database objects that do not contain any vowels.Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-03-18 16:14MIT License
468Names of character classes are not in the lowercaseFind regular expressions where the names of character classes are not completely in lowercase. For instance, incorrect is to write [[:UPPER:]] or [[:Upper:]] and correct is [[:upper:]].Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 13:22MIT License
469Names of columns with the type BOOLEANThe naming of BOOLEAN columns must be consistent. For the better readability the names of such columns could have prefix "is_" (in English) or "on_" (in Estonian)GeneralINFORMATION_SCHEMA+system catalog base tables2024-01-03 09:41MIT License
470Names of database objects (regular identifiers) that contain $Find names (identifiers) of user-defined database objects that are regular identifiers and contain the $ sign starting from the second position. "Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable." (PostgreSQL manual)Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-17 10:06MIT License
471Names of database objects that are fully uppercaseFull uppercase means screaming and it makes comprehending the names more difficult. Find the names (identifiers) of user-defined database objects that are fully uppercase. Because PostgreSQL stores regular identifiers lowercase in the system catalog it also means that these are delimited identifiers, i.e., these are case sensitive.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-07 09:28MIT License
472Names of database objects that are used to manage the state of main objects in the database"Names in software are 90 percent of what make software readable. You need to take the time to choose them wisely and keep them relevant. Names are too important to treat carelessly. Names should not cause confusion." (Robert C. Martin, Clean Code) The naming must be consistent. One should avoid mixing synonyms like "seisund", "staatus", and "olek" in Estonian or "state" and "status" in English and stick with one term.GeneralINFORMATION_SCHEMA+system catalog base tables2023-03-18 16:53MIT License
473Names of database objects that contain a digitFind the names (identifiers) of user-defined database objects that contain at least one digit. Names should be informative. Duplicates should be avoided. Digits in names are a possible sign of duplication of database objects or unclear names.GeneralINFORMATION_SCHEMA+system catalog base tables2023-03-17 10:05MIT License
474Names of database objects that contain dollar signFind names of database objects that contain a dollar sign ($) that is not the first symbol of the name. In PostgreSQL regular identifiers cannot start with $. However, $ can be used in other positions of the name. "Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable." (PostgreSQL documentation)Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-17 10:00MIT License
475Names of database objects that contain two or more consecutive underscores or spaces as separators of name componentsImprove the readability of names. Find the names (identifiers) of user-defined database objects that contain two or more consecutive underscores or spaces that separate name components, i.e., these are not at the beginning and in the end of the name. Example of such names are person__id or "person id". Names with duplicate underscores use snake case style but duplication of underscores does not improve the usability of the name.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-18 16:48MIT License
476Names of database objects that end with an underscoreFind names of database objects that end with a underscore.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-17 09:56MIT License
477Names of database objects that mix snake_case and camelCase/PascalCaseUse consistent style of naming. Prefer snake_case. Regular identifiers are stored in the PostgreSQL system catalog in lowercase. Thus, if you use, for instance the identifier thisIsLongTableName, then, for instance,in the pg_dump result you will see the table name thisislongtablename. If the name in the system catalog is thisIsLongTableName, then it means that the name is a delimited identifier, i.e., case sensitive.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-16 20:34MIT License
478Names of database objects that perhaps end with a sequence numberFind the names (identifiers) of user-defined database objects that end with one or more digit. Names should be informative. Duplicates should be avoided. Digits in names are a possible sign of duplication of database objects or unclear names.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-12 10:09MIT License
479Names of database objects that perhaps end with a sequence number (aggregate view)Find the number of names (identifiers) of user-defined database objects that end with one or more digit. Names should be informative. Duplicates should be avoided. Digits in names are a possible sign of duplication of database objects or unclear names.Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-11-12 10:06MIT License
480Names of database objects that start with an underscoreImprove the readability of names. Find the names (identifiers) of user-defined database objects that start with an underscore. This is not necessarily a mistake. For instance, parameter names could start with an underscore. On the other hand, it could be that the prefix is missing in the name.GeneralINFORMATION_SCHEMA+system catalog base tables2023-03-18 16:49MIT License