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...
321The same CHECK has a different name in different placesFind the names of table CHECK constraints that have the same Boolean expression but a different naming style in different places (tables). The naming of constraints should be consistent. "If you do something a certain way, do all similar things in the same way." (Robert C. Martin, Clean Code)Problem detectionsystem catalog base tables only2023-01-14 20:47MIT License
322The number of derived table columns with an array, a user-defined, XML, JSON, or JSONB typeFind the number of derived table columns with json, xml, array, or user-defined types. Such columns may contain data that has been aggregated/composed based on values in base tables.Sofware measureINFORMATION_SCHEMA+system catalog base tables2023-01-14 20:22MIT License
323Paramtetes with an array type, XML, JSON, or JSONB typeFind parameters of user-defined routines that type is an array type, xml, json, or jsonb type. Make sure that the parameter name matches the type (perhaps should be in plural).GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 20:21MIT License
324Transform method does not returnFind user-defined SQL and PL/pgSQL routines that do not return a value although the name suggest that it should return a value (contains "_to_").Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-14 19:37MIT License
325Table has multiple columns for free-form descriptionsFind tables that contain multiple columns for free-form textual descriptions. Make sure that the names of columns are understandable and sufficiently different. Make sure that there are no duplicate columns.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 15:36MIT License
326Table has both state and status columnsFind tables that contain both a state and a status column.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-14 15:26MIT License
327Names of triggers and rules that do contain the table nameThe names should contain table name in order to make the names better understandable.GeneralINFORMATION_SCHEMA+system catalog base tables2023-01-13 19:23MIT License
328Names of triggers and rules that do not contain the table nameThe names should contain table name in order to make the names better understandable.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-13 19:18MIT License
329Inconsistent use of plural and singular in table names in the context of a relationship (Estonian version)Find foreign key constraints in case of which the name of one of the tables is in plural and the name of another table is in singular.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-13 14:21MIT License
330Inconsistent use of plural and singular in column names in the context of a relationship (English version)Find foreign key constraints that cover one column in case of which the name of refererenced/referencing column is in plural and the name of referencing/refererenced column is in singular.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-13 14:14MIT License
331Inconsistent use of plural and singular in table names in the context of a relationship (English version)Find foreign key constraints in case of which the name of one of the tables is in plural and the name of another table is in singular.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-13 13:41MIT License
332Names of indexes that do not contain the table nameFind indexes that do not support a declarative constraint and that are perhaps badly named. Table names make the names more expressive and user-friendly.Problem detectionsystem catalog base tables only2023-01-10 18:13MIT License
333Names of constraints (directly connected to a base table) that do not contain the table nameFind constraints that are perhaps badly named. Table names help us to ensure the uniqueness of the names within a schema and make the names more expressive and user-friendly.Problem detectionsystem catalog base tables only2023-01-10 18:03MIT License
334Number of system-generated and user-defined constraint names by constraint type (constraints that involve more than one column)Find the number of system-generated constraint names by constraint type. Names should follow the same style. If there is a mix of system-generated and user-defined names, then the style is most probably different.Sofware measuresystem catalog base tables only2023-01-10 14:53MIT License
335Using system-defined names of constraints (constraints that involve more than one column)Find the constraint types in case of which there exists system-defined names.Problem detectionsystem catalog base tables only2023-01-10 14:53MIT License
336Using system-defined names of constraints (constraints that involve one column)Find the constraint types in case of which there exists system-defined names.Problem detectionsystem catalog base tables only2023-01-10 14:53MIT License
337Number of system-generated and user-defined constraint names by constraint type (constraints that involve one column)Find the number of system-generated constraint names by constraint type. Names should follow the same style. If there is a mix of system-generated and user-defined names, then the style is most probably different.Sofware measuresystem catalog base tables only2023-01-10 14:52MIT License
338Too generic names (table constraints)Find table constraints (constraints that are associated directly with the table) that have too generic names like "key" or the name contain too generic words like "data" (all constraints restrict data in the table), or the name is an abbreviation of a constraint type name.Problem detectionsystem catalog base tables only2023-01-08 10:40MIT License
339Too generic names (unique indexes)Find unique indexes that have too generic names like "key" or the name contain too generic words like "data" (all constraints restrict data in the table), or the name is an abbreviation of a constraint type name.Problem detectionsystem catalog base tables only2023-01-08 10:38MIT License
340Too generic names (routines)"Avoid using the same word for two purposes. Using the same term for two different ideas is essentially a pun" (Robert C. Martin, Clean Code) Do not use the Estonian words like 'lisa', 'muuda', 'kustuta' or the corresponding English words 'add', 'delete', 'update' as the names of routines because it would make the code much less understandable. What is the task of the routine f_add? Register people? Register orders? What? Do not refer to the generic concepts like data and information because all routines work with these.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-07 20:38MIT License