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...
381Frequent names of database objects"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) Names should be expressive. Find the names (identifiers) of user-defined database objects that occur at least twice as frequently as a name occurs in average. Also make sure that there is no duplication in play.Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-03-17 10:08MIT License
382Frequent names of database objects by object type"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) Names should be expressive. Find the names (identifiers) of user-defined database objects that occur at least twice as frequently as a name occurs in average in case of the particular type of database objects. Also make sure that there is no duplication in play.Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-03-18 16:57MIT License
383Full text search columns that have no gin or gist indexFind columns of base tabels and materialized views with the type tsvector that do not have a gin or a gist index. These are the preferred index types for text search.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-07 09:22MIT License
384Full text search columns with other type of index than gin or gist indexFind columns of base tabels and materialized views with the type tsvector that do not have a gin or a gist index but have another type of index (e.g., b-tree). Gin and Gist are the preferred index types for text search.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-07 09:22MIT License
385Function in a function-based index of a column is different from the function that is used in the subquery of a derived tableFind cases where the function of a function-based index of a column is different from the function that is used in the query in a derived table based on the column.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
386Function in a function-based index of a column is different of the function that is used in the query in a routine based on the columnCreate appropriate indexes to speed up queries. If you apply a function to a column in a query, then create a function-based index based on the function to the column.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 17:26MIT License
387Functions that have transactional controlFind functions that contain transactional control statements (BEGIN, START TRANSACTION, COMMIT, ROLLBACK, SAVEPOINT) in their body. PostgreSQL does not permit transaction control in functions.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 10:50MIT License
388Grantable column privilegesFind column privileges that the carrier of the privilege can in turn grant to others, i.e., the privileges have been given WITH GRANT OPTION. The number of privileges that can be passed on should be as small as possible.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-07 13:43MIT License
389Grantable routine privilegesFind routine privileges that the carrier of the privilege can in turn grant to others, i.e., the privileges have been given WITH GRANT OPTION. The number of privileges that can be passed on should be as small as possible.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-07 13:43MIT License
390Grantable table privilegesFind table privileges that the carrier of the privilege can in turn grant to others, i.e., the privileges have been given WITH GRANT OPTION. The number of privileges that can be passed on should be as small as possible.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-07 13:43MIT License
391Grantable usage privilegesFind usage privileges that the carrier of the privilege can in turn grant to others, i.e., the privileges have been given WITH GRANT OPTION. The number of privileges that can be passed on should be as small as possible.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-07 13:43MIT License
392Gratuitous 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
393Gratuitous context in the names of parametersFind routine parameter names that contain the routine name. Names of routine parameters shouldn't contain the name of the routine. It makes the names too long. A routine cannot have two parameters with the same name.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:30MIT License
394Identifiers that explicitly say that they carry no meaningFind identifiers that explicitly say that they carry no meaning. Such identifier is called "unnamed" or "anonymous".Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-17 11:06MIT License
395Inconsistency of using column data types/field sizes in case of columns that implement relationshipsFind foreign key constraints where the candidate key columns (belong to a PRIMARY KEY/UNIQUE constraint) and foreign key columns do not have the same data type and field size. Primary key/unique columns and foreign key columns should have the same data type and field size. If, for instance, the primary key column has type INTEGER and foreign key column has type SMALLINT, then one cannot use all the primary key values as foreign key values.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-10 12:13MIT License
396Inconsistency of using parameter data typesFind parameters of routines that have the same name but a different type. Parameters that have the same name should have, in general, the same data type as well, assuming that the routines, which have the parameters, have different names, i.e., there is no overloading in play.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
397Inconsistent means of concatenation in various database objectsFind as to different database objects use different means to concatenate text (format function, concat function, concat_ws function, || operator).Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-10-28 17:36MIT License
398Inconsistent names 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. For instance, it is a bad practice to use word "state" in table names but word "status" in function names.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-18 17:13MIT License
399Inconsistent naming of columns with BOOLEAN typeFind as to whether some columns with the type Boolean start with a prefix ("is", "has", "can", "on") and some do not.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-03 09:54MIT License
400Inconsistent naming of comment columnsFind columns of tables that start with the word comment or komment but end differently (excluding numbers). Return result only if there is more than one naming variant of such columns in the database. For instance, a column has the name "comment" but another "comments".Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-15 14:09MIT License