Catalog of PostgreSQL queries for finding information about a PostgreSQL database and its design problems

AND
AND
ANDQueries of this catergory provide information about the use of regular expressions.
ANDFrom where does the query gets its information?
AND
AND

There are 29 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
1A predefine character class has been incorrectly specifiedFind regular expressions where a predefined character class is incorrectly specified, e.g. [digit] instead of [:digit:].Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-23 12:09MIT License
2CHECK constraint with pattern matching on non-textual columnsFind base table and foreign table columns that do not have a textual type but have a single-column check constraint that uses pattern matching. The use of a regular expression, a LIKE clause, or a SIMILAR TO clause in order to constrain values in a non-textual column points to the incorrect selection of operator or column data type.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
3Double checking of the maximum character lengthDo not duplicate code. In this case a CHECK constraint duplicates the restriction that is already enforced with the help of the declaration of the maximum field size (for instance, VARCHAR(100)).Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-18 13:27MIT License
4Duplicate specification of character classesFind regular expressions where within the same specification of a character class the character class alnum as well as 0-9, \d, A-Z, or a-z has been defined.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-24 10:43MIT License
5Duplication of case insensitivity specification in a regular expressionFind regular expressions that use both case insensitive search operator ~* and case insensitivity modifier (?i).Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 12:49MIT License
6Inconsistent referencing to character classes (digits)Find as to whether different syntaxes (e.g., 0-9 vs [[:digit:]] or \d) are used to refer to the character class of digits within the same database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-01 11:57MIT License
7Inconsistent referencing to character classes (shorthand vs long name)Find as to whether different syntaxes (e.g., \s vs [[:space:]]) are used to refer to character classes within the same database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-11-19 11:24MIT License
8Inconsistent referencing to character classes (shorthand vs long name) (2)Find as to whether different syntaxes (e.g., \w vs [[:alnum:]]) are used to refer to alphanumeric characters within the database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-11-19 11:32MIT License
9Incorrect specification of logical or in regular expressionsFind the use of regular expressions where logical or is incorrectly specified, i.e., (| or |).Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-24 12:07MIT License
10Incorrect suffix of a constraint name or an index nameIf the name of an object has the suffix that refers to the type of the object (for instance, primary key constraint or foreign key constraint), then you should use references to the correct object type. Find suffixes of constraint names and index names that incorrectly refer to the type of the object. For instance, incorrect would be to use _chk as the suffix of an index name or _pk as the suffix of a check constraint name.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-02-25 17:29MIT License
11Invalid character classPostgreSQL regular expressions do not have character classes word and letter.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 12:50MIT License
12Invalid use of the case insensitive search modifier in regular expressionsFind regular expression patterns that use (?i) modifier in any other place than at the beginning of the pattern or (?-i) in any place of the pattern. Such use of the modifiers is not supported by PostgreSQL.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 16:06MIT License
13LIKE instead of =Find expressions that use LIKE predicate for precise comparison.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-09 10:43MIT License
14LIKE with a regular expression patternFind expressions that use LIKE (including ILIKE) predicate with a regular expression patterns. In a LIKE pattern one can use only _ and % metasymbols to construct a pattern.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-10-21 10:38MIT License
15Names of character classes are not in the lowercaseFind regular expressions where the names of character classes are not completely in lowercase. For instance, incorrect is to write [[:UPPER:]] or [[:Upper:]] and correct is [[:upper:]].Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 13:22MIT License
16Non-predefined character classes must not be between double square bracketsWrite correct regular expressions. For instance, if there is a rule that code must consist of one or more digits, then correct expression is code~'^[0-9]+$', not code~'^[[0-9]]+$'.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-13 12:32MIT License
17Perhaps a regular expression could be simplifiedFind regular expressions that name character classes a-zA-Z.Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-04 16:19MIT License
18Perhaps brackets are missing in a regular expression that uses OR logical operationFind regular expressions where choice between alternatives has no brackets. Thus, instead of '(a|b|c)' there is 'a|b|c'. An example: '^a|b|c$' -permits in the string symbol "|" but '^(a|b|c)$' does not permit in the string symbol "|".Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-09 20:22MIT License
19Perhaps character class [[:alnum:]] could be usedPerhaps regular expressions that refer to character classes alnum and digit could be simplified.Problem detectionINFORMATION_SCHEMA+system catalog base tables2024-11-02 09:32MIT License
20Perhaps checking of file extension is incorrectFind check constraints of tables that use a regular expression to check as to whether a registered string ends with an appropriate file extension. However, the expression does not put the dot sign into the square brackets nor does have the escape character \before it, i.e., it is interpreted as a single character not as the dot sign in the expression. In regular expressions the dot (.) matches any single character except the newline character.Problem detectionINFORMATION_SCHEMA only2023-11-08 15:29MIT License