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...
361Function Upper or Lower is used in an index on a non-textual columnFind function-based indexes that are based on function Upper or Lower but have been defined on a non-textual column. Such indexes support case insensitive search but in case of non-textual columns this does not have a meaning.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
362Generated stored base table columnsFind generated stored columns in PostgreSQL base tables. The support of generated columns was added to PostgreSQL 12. These could be used to improve the performance of queries.GeneralINFORMATION_SCHEMA only2020-11-06 14:51MIT License
363Generated stored base table columns duplicates another column in the tableFind generated stored columns in PostgreSQL base tables that duplicate other columns in the table.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:30MIT License
364Generated stored base table columns that expression does not refer to any columnFind generated stored base table columns that expression does not refer to any column of the table. It could be that there will be a constant value in every row in case of this column. The support of generated columns was added to PostgreSQL 12.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
365Grantable 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
366Grantable privileges on the database and its schemas, domains, types, languages, sequences, foreign data wrappers, and foreign serversFind privileges on the database and its schemas, domains, types, languages, sequences, foreign data wrappers, and foreign servers 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 detectionsystem catalog base tables only2024-01-07 13:43MIT License
367Grantable rolesFind roles that a member can grant to others, i.e., the role has been granted with ADMIN OPTION. The number of privileges that can be passed on should be as small as possible.Problem detectionsystem catalog base tables only2024-01-07 13:42MIT License
368Grantable 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
369Grantable 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
370Grantable 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
371Granted rolesFind membership relations between roles.Generalsystem catalog base tables only2024-01-07 13:30MIT License
372GranteesDatabase must be used by users who have minimal set of privileges for performing tasks. The query helps to find out as to whether some user/role other than PUBLIC and a superuser have rights to use tables and routines of the database.GeneralINFORMATION_SCHEMA only2020-11-06 14:51MIT License
373Gratuitous context in the names of foreign key columnsFind foreign key columns that name contains twice the name of the referenced (primary) table.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
374Gratuitous 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
375Gratuitous 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
376Gratuitous context in the names of schema objectsFind schema objects that name starts with the schema name and then has at least one more symbol. "Shorter names are generally better than longer ones, so long as they are clear. Add no more context to a name than is necessary" (Robert C. Martin, Clean Code) Shema is a namespace. There cannot be in the same schema two schema objects that belong to the same name class and have the same name.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
377Identical indexesFind indexes that are identical, i.e., have the same properties, including uniqueness. The query considers all types of indexes, including indexes that have been automatically created to support a constraint and function-based indexes.Problem detectionsystem catalog base tables only2021-02-25 17:30MIT License
378Identifiers 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
379Inappropriate field size or data type for column that strores database usernameFind columns of base tables that based on the default value of the column contain database username. However, the type of the column is not VARCHAR(63) or VARCHAR(128).Problem detectionINFORMATION_SCHEMA only2023-11-19 11:58MIT License
380Inconsistency between the name and the type of a base table column (dates)Find base table columns that name refers to the possibility that these are used to register dates. Find the columns that do not have an appropriate data type. Column names should reflect the data that is possible to record in the column. For instance, in case of temporal data the column name should indicate as to whether we record dates or timestamps. If the column data type is "date", then the suffix of the column name should be "kp" (Estonian) or "date" (English).Problem detectionINFORMATION_SCHEMA only2021-03-27 16:16MIT License