Filter Queries
Found 1053 queries.
- All the queries about database objects contain a subcondition to exclude from the result information about the system catalog.
- Although the statements use SQL constructs (common table expressions; NOT in subqueries) that could cause performance problems in case of large datasets it shouldn't be a problem in case of relatively small amount of data, which is in the system catalog of a database.
- Statistics about the catalog content and project home in GitHub that has additional information.
#101. Perhaps unnecessary privileges to use the database
system catalog base tables onlyFind as to whether a database user (except postgres), who is not a superuser, has Create (C) or Temporary (T) privileges to use the database.
#102. Inconsistent use of session_user and current_user functions
INFORMATION_SCHEMA+system catalog base tablesFind as to whether both functions session_user and current_user are used in the database.
#103. Inconsistent data type usage in case of registering sums of money
INFORMATION_SCHEMA onlyFind as to whether both the numeric type and integer types are used in case of columns that are meant for register data about prices.
#104. Inconsistent time zone and precision usage in case of registering times
INFORMATION_SCHEMA onlyFind as to whether different data types (with and without timezone) and precisions are used in case of registering times in different columns.
#105. Inconsistent time zone and precision usage in case of registering timestamps
INFORMATION_SCHEMA onlyFind as to whether different data types (with and without timezone) and precisions are used in case of registering timestamps in different columns.
#106. Inconsistent precision and scale usage in case of registering sums of money
INFORMATION_SCHEMA onlyFind as to whether different precisions/scales are used in case of registering data about sums of money in different columns.
#107. Cycles in relationships
INFORMATION_SCHEMA+system catalog base tablesFind 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.
#108. Perhaps an inconsistent use of NO ACTION and RESTRICT in the foreign key declarations
system catalog base tables onlyFind 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.
#109. Inconsistent means to calculate tsvector values
INFORMATION_SCHEMA onlyFind 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.
#110. Perhaps inconsistent use of temporal functions (2)
INFORMATION_SCHEMA+system catalog base tablesFind as to whether in the same database more than one of these functions is used at the same time - now(), localtimestamp, current_timestamp.
#111. Inconsistent use of casting syntax in routines
INFORMATION_SCHEMA+system catalog base tablesFind 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).
#112. PUBLIC has TEMPORARY privilege in the database
system catalog base tables onlyFind as to whether PUBLIC (all current and future users) has TEMPORARY privilege in the database. PUBLIC gets the privilege by default.
#113. Inconsistent referencing to character classes
INFORMATION_SCHEMA+system catalog base tablesFind as to whether regular expressions use inconsistently references to character classes: [^\s], [^\d], [^\w], [^[:space:]], [^[:digit:]], [^[:word:]] vs [^\S], [^\D], [^\W].
#114. Database can be accessed through PUBLIC privileges
system catalog base tables onlyFind 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.
#115. Inconsistent use of functions and procedures
INFORMATION_SCHEMA+system catalog base tablesFind 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.
#116. Some data modification functions return a value and some not
INFORMATION_SCHEMA+system catalog base tablesFind as to whether there are data modification routines that return a value as well as data modification routines that do not return a value.
#117. Inconsistent data type usage in case of registering a date
INFORMATION_SCHEMA onlyFind as to whether there are multiple different types used in case of columns that are meant for registering dates.
#118. Each table is both referencing and referenced table (perhaps there is a cycle in relationships)
INFORMATION_SCHEMA+system catalog base tablesFind 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.
#119. Inconsistent use of older and newer join syntax in the subqueries of derived tables
INFORMATION_SCHEMA+system catalog base 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).
#120. Sometimes current_timestamp, sometimes now()
INFORMATION_SCHEMA+system catalog base tablesFind as to whether you sometimes use current_timestamp function and sometimes now() function. These implement the same functionality.
| # | Name | Goal (sorted ascending) | Type | Data source | Last update | License | Actions |
|---|---|---|---|---|---|---|---|
| 101 | Perhaps unnecessary privileges to use the database | Find as to whether a database user (except postgres), who is not a superuser, has Create (C) or Temporary (T) privileges to use the database. | Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 102 | Inconsistent use of session_user and current_user functions | Find as to whether both functions session_user and current_user are used in the database. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 103 | Inconsistent data type usage in case of registering sums of money | Find as to whether both the numeric type and integer types are used in case of columns that are meant for register data about prices. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 104 | Inconsistent time zone and precision usage in case of registering times | Find as to whether different data types (with and without timezone) and precisions are used in case of registering times in different columns. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 105 | Inconsistent time zone and precision usage in case of registering timestamps | Find as to whether different data types (with and without timezone) and precisions are used in case of registering timestamps in different columns. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 106 | Inconsistent precision and scale usage in case of registering sums of money | Find as to whether different precisions/scales are used in case of registering data about sums of money in different columns. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 107 | Cycles in relationships | Find 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 detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 108 | Perhaps an inconsistent use of NO ACTION and RESTRICT in the foreign key declarations | Find 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 detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 109 | Inconsistent means to calculate tsvector values | Find 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 detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 110 | Perhaps inconsistent use of temporal functions (2) | Find as to whether in the same database more than one of these functions is used at the same time - now(), localtimestamp, current_timestamp. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 111 | Inconsistent use of casting syntax in routines | Find 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 detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 112 | PUBLIC has TEMPORARY privilege in the database | Find as to whether PUBLIC (all current and future users) has TEMPORARY privilege in the database. PUBLIC gets the privilege by default. | Problem detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 113 | Inconsistent referencing to character classes | Find as to whether regular expressions use inconsistently references to character classes: [^\s], [^\d], [^\w], [^[:space:]], [^[:digit:]], [^[:word:]] vs [^\S], [^\D], [^\W]. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 114 | Database can be accessed through PUBLIC privileges | Find 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 detection | system catalog base tables only | MIT (opens in new tab) | View (opens in new tab) | |
| 115 | Inconsistent use of functions and procedures | Find 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 detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 116 | Some data modification functions return a value and some not | Find 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 detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 117 | Inconsistent data type usage in case of registering a date | Find as to whether there are multiple different types used in case of columns that are meant for registering dates. | Problem detection | INFORMATION_SCHEMA only | MIT (opens in new tab) | View (opens in new tab) | |
| 118 | Each 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 detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 119 | Inconsistent use of older and newer join syntax in the subqueries of derived tables | Find 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 detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) | |
| 120 | Sometimes current_timestamp, sometimes now() | Find as to whether you sometimes use current_timestamp function and sometimes now() function. These implement the same functionality. | Problem detection | INFORMATION_SCHEMA+system catalog base tables | MIT (opens in new tab) | View (opens in new tab) |