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...
121Cycles in relationshipsFind as to whether foreign key constraints between tables form a cycle. For instance, if table C refers to table B, table B refers to table A, table A refers to table C and all the foreign key columns are mandatory, then one cannot add data to the tables. Is cycle value in the result should not contain value TRUE. One should check manually as to whether the foreign key columns are mandatory or optional.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-28 15:15MIT License
122Perhaps an inconsistent use of NO ACTION and RESTRICT in the foreign key declarationsFind as to whether in case of foreign key constraints both the compensating actions RESTRICT and NO ACTION are used within the same database. If the same thing has to do in different places, then try to do it in the same way.Problem detectionsystem catalog base tables only2021-02-25 17:29MIT License
123Inconsistent means to calculate tsvector valuesFind as to whether in the database there are multiple ways to calculate tsvector values, i.e., by using a generated column and by not using a generated column.Problem detectionINFORMATION_SCHEMA only2023-11-07 11:35MIT License
124Inconsistent use of casting syntax in routinesFind as to whether PL/pgSQL routines and SQL routines that do not have SQL-standard body use different syntax for casting (cast function vs :: operator).Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-10-29 11:33MIT License
125PUBLIC has TEMPORARY privilege in the databaseFind as to whether PUBLIC (all current and future users) has TEMPORARY privilege in the database. PUBLIC gets the privilege by default.Problem detectionsystem catalog base tables only2021-12-31 15:52MIT License
126Inconsistent referencing to character classesFind as to whether regular expressions use inconsistently references to character classes: [^\s], [^\d], [^\w], [^[:space:]], [^[:digit:]], [^[:word:]] vs [^\S], [^\D], [^\W].Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-09 12:02MIT License
127Inconsistent 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
128Database can be accessed through PUBLIC privilegesFind as to whether the database access by users (applications) can take place thanks to PUBLIC privileges, i.e., find as to whether PUBLIC (all current and future users) has CONNECT privilege in the database. PUBLIC gets the privilege by default.Problem detectionsystem catalog base tables only2022-10-31 10:19MIT License
129Inconsistent use of functions and proceduresFind as to whether the database has both procedures as well as functions that do not return a value (i.e., return VOID). Such routines are generally used to modify data in the database. The support of procedures was added to PostgreSQL 11.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-10-26 15:05MIT License
130Some data modification functions return a value and some notFind as to whether there are data modification routines that return a value as well as data modification routines that do not return a value.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-29 16:47MIT License
131Inconsistent data type usage in case of registering a dateFind as to whether there are multiple different types used in case of columns that are meant for registering dates.Problem detectionINFORMATION_SCHEMA only2021-03-21 18:32MIT License
132Each table is both referencing and referenced table (perhaps there is a cycle in relationships)Find as to whether the relationships between tables form a complete bidirected graph. Tables are vertices in the graph. There is a directed edge between two vertices if one of the tables refers to another through foreign key relationship on mandatory columns.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-28 14:04MIT License
133Inconsistent use of older and newer join syntax in the subqueries of derived tablesFind as to whether the subqueries of derived tables use both older join syntax (join condition in the where clause) and newer syntax (join condition in the from clause).Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-01-24 13:26MIT License
134Sometimes regexp_like, sometimes ~Find as to whether you sometimes use regexp_like function and sometimes ~ operator. These implement the same functionality. regexp_like function that was added to PostgreSQL 15 and provides the same functionality as ~ and ~* operators. Try to be consistent.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-12-13 13:23MIT License
135Do not use approach that one size fits all (unique index columns)Find base base tables have a simple unique index (not associated with a constraint) that contains the column with the (case insensitive) name id and an integer type. In addition, the key values are generated automatically by the system by using a sequence generator.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-01-07 15:12MIT License
136Only ID primary keyFind base base tables have the simple primary key that contains a column with the (case insensitive) name id and an integer type. In addition, the primary key values are generated automatically by the system by using a sequence generator. In addition the base table must not have any unique constraint.Problem detectionINFORMATION_SCHEMA+system catalog base tables2022-11-09 15:15MIT License
137Do not use approach that one size fits all (primary key columns)Find base base tables have the simple primary key that contains the column with the (case insensitive) name id and an integer type. In addition, the primary key values are generated automatically by the system by using a sequence generator.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-03-18 20:58MIT License
138Do not format comma-separated lists (based on column names)Find, based on column names, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table or a foreign table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters.Problem detectionINFORMATION_SCHEMA only2021-03-10 12:57MIT License
139Do not format comma-separated lists (based on default values)Find, based on default values, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table or a foreign table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters.Problem detectionINFORMATION_SCHEMA only2023-12-30 10:59MIT License
140Do not format comma-separated lists (based on user data)Find, based on the data that users have recoreded in a database, cases where a multi-valued attribute in a conceptual data model is implemented as a textual column of a base table. Expected values in the column are strings that contain attribute values, separated by commas or other separation characters.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-03-12 15:02MIT License