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...
861Too generic names (columns)Find the names of columns that are too generic. In SQL databases data/information is represented as values in columns. It is not a good style to use generic words like data, information, column, etc. In the names of columns. Moreover, avoid too generic column names like: id, tyyp, kood, aeg, kp,type, code, time, date, fk, pk.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-15 10:33MIT License
862Too generic names (columns) (there is a column with a more specific name in the table)Find column names in case of which the same table has another column (with more specific name) that name contains the column name in the end or in the beginning. For instance, a base table has columns parent and root_parent and the former col-umn name is too generic, i.e., it should be more specific.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-20 01:01MIT License
863Too generic names (domain constraints)Find domain CHECK constraints that have a too generic name - for instance, the name contains word "data" ) or the name is an abbreviation of the constraint type name (for instance, "chk" or "chk1").Problem detectionINFORMATION_SCHEMA only2021-10-31 17:39MIT License
864Too generic names (foreign key columns)Find foreign key columns with the names like id, identifikaator, code, kood, number, etc. The names should have a prefix or a suffix that describes the nature of relationship with the referenced table or at least referes to the referenced table. These are too generic names.Problem detectionsystem catalog base tables only2023-01-20 12:37MIT License
865Too generic names (parameters)Find the names of parameters that are too generic. The routines work with data/information. Thus, it is not a good style to use generic words like data, information, parameter, etc. In the names of parameters. Moreover, avoid too generic parameter names like: id, tyyp, kood, aeg, kp,type, code, time, date, fk, pk, param.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-20 14:08MIT License
866Too generic names (parameters) (there is a parameter with a more specific name in the routine)Find parameter names in case of which the same routine has another parameter with the same mode but with more specific name, i.e., the name contains the parameter name in the end or in the beginning.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-06 12:03MIT License
867Too generic names regarding persons and their names (columns of derived tables)Find derived table columns that name refers to the possibility that these contain person names. The names of derived table columns that contain person names should refer to the role that the corresponding entity type has in the view. For instance, if view active_product has a column with the name surname, then the column name does not give information what is the role of the person in the context of the view. Better name would be, for instance, registrator_surname.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-10 14:25MIT License
868Too 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
869Too 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
870Too generic names (tables)Find the names of tables that are too generic. In SQL databases data/information is represented as values in columns. It is not a good style to use generic names like table, data, information, list etc. in the names of tables.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-07 20:37MIT License
871Too generic names (unique index columns)Find unique index (not associated with a constraint) columns with the names like id, identifikaator, code, kood, number, etc. The names could have underscores as the prefix or suffix. These are too generic names.Problem detectionsystem catalog base tables only2023-01-07 20:34MIT License
872Too 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
873Too generic names (user-defined types, domains)Find names of user-defined types and domains that contain too generic (noise) words.Problem detectionsystem catalog base tables only2021-10-31 17:41MIT License
874Too short domain constraint namesFind names of domain constraints that are shorter than the length of the name of the domain + two characters.Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
875Too short 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) The names should be meaningful and searchable. Find the names (identifiers) of user-defined database objects that are shorter than three characters.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-19 11:07MIT License
876Too short or missing comments of derived tables and routinesFind views, materialized views, and user-defined routines that do not have a comment at all or the comment is shorter than twice the length of the object name, or the comment states that it is missing (TODO). You should give information to future developers and maintainers of the system (including the future version of yourself). Do not just repeat the name in the comment (with perhaps some rewording).Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-19 12:56MIT License
877Too short table constraint namesThe names should be expressive. Find names of constraints, which are associated directly to a table, that are shorter than the length of the name of the table + two characters.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
878Too short view namesNames should be expressive. Find views that name is shorter than the average length of the the names of its directly underlying tables (both base tables and derived tables).Problem detectionINFORMATION_SCHEMA only2021-02-25 17:29MIT License
879Too wide composite indexesFind composite indexes that do not support any constraint but are on more than three columns.Problem detectionsystem catalog base tables only2021-11-06 02:40MIT License
880Too wide derived (dependent) tableFind derived tables (views, materialized views) that are based on more than five tables and that have more than 15 columns. This view might produce "a denormalized world view" where all the data is together in one table and applications make queries based on this single view to fulfill their specific tasks. Such view does not follow the separation of concerns principle.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-12-13 12:34MIT License