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...
21All updatable viewsFind all views through which it is possible to modify data in base tables. Is_insertable_into and is_updatable show as to whether the view is naturally updatable in PostgreSQL or has associated rules that make sure that INSERT/UPDATE/DELETE operations against the view will not cause an error. Please note that the rule could be DO INSTEAD NOTHING rule, i.e., data modification through the view does not cause an error but the data is not actually modified. If the updatability is achieved due to rules, then is_updatable=YES if the view has both UPDATE and DELETE rule that make sure that UPDATE and DELETE operations do not cause an error.GeneralINFORMATION_SCHEMA only2024-01-14 17:09MIT License
22Different tasks of rulesFind different tasks that are solved by using rules, i.e., different rules on the same table or different tables that do the same thing are considered to solve one task.Generalsystem catalog base tables only2024-01-14 16:10MIT License
23The number of rules by different characteristicsFind the number of rules by event (SELECT, INSERT, UPDATE, and DELETE) and in total.Sofware measuresystem catalog base tables only2024-01-14 16:10MIT License
24Number of used tablesFind statistics about how many derived tables have how many different underlying tables.Sofware measureINFORMATION_SCHEMA+system catalog base tables2024-01-14 13:43MIT License
25Number of using viewsFind statistics about how many base tables have how many derived tables that use these tables.Sofware measureINFORMATION_SCHEMA+system catalog base tables2024-01-14 13:42MIT License
26Views with WHERE but without security barrierFind views that do not have the security barrier option but restrict rows in some way.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-14 12:58MIT License
27Number of views with and without security barrierFind the number of views, the number of views with and without security barrier setting, and the names of views with and without the security barrier setting.Sofware measureINFORMATION_SCHEMA+system catalog base tables2024-01-14 12:54MIT License
28Number 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
29Usage of base tablesFind for each derived table the list of base tables that are used by the derived table.GeneralINFORMATION_SCHEMA+system catalog base tables2024-01-14 00:50MIT License
30Explicit locking is missingPostgreSQL uses multiversion concurrency control (MVCC). SELECTs do not block modifications and vice versa. One has to take steps to achieve correct behaviour.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-14 00:35MIT License
31Routines with BOOLEAN return type that do not have a good nameThe prefic of the name should be "is_" or "has_" or "can_" (in English) or "on_" (in Estonian). Worse: check_rights. Better: has_rights.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-13 20:41MIT License
32Grantable 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
33Grantable 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
34Grantable 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
35Grantable 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
36Grantable 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
37Grantable 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
38Granted rolesFind membership relations between roles.Generalsystem catalog base tables only2024-01-07 13:30MIT License
39Perhaps a too long SQL routineA large routine may have multiple tasks that should be split between multiple routines that have a more focused task. Find the SQL routines where the number of statements (logical lines of code) is bigger than 5.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-04 16:39MIT License
40Perhaps a too long PL/pgSQL routineA large routine may have multiple tasks that should be split between multiple routines, each of which has a more focused task. Find the PL/pgSQL routines where the number of physical lines of code is bigger than 20.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-04 16:38MIT License