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.

#621. Multiple RETURNING clauses in a SQL function

INFORMATION_SCHEMA+system catalog base tables

Find SQL functions that have multiple statements with the RETURNING clause.

Problem detection License: MIT (opens in new tab)

#622. Multiple selects from the same table in a routine

INFORMATION_SCHEMA+system catalog base tables

Code should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of selecting different fields of the same row with different SELECT INTO statements one should try to do it with one statement.

Problem detection License: MIT (opens in new tab)

#623. Multiple triggers that update tsvector values

system catalog base tables only

Find base tables that have multiple triggers to update tsvector values.

Problem detection License: MIT (opens in new tab)

#624. Multiple updates of the same table in a routine

INFORMATION_SCHEMA+system catalog base tables

Code should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of updating different fields of the same table with different UPDATE statements one should try to do it with one statement.

Problem detection License: MIT (opens in new tab)

#625. Name and description maximum length

INFORMATION_SCHEMA+system catalog base tables

Find tables where is both a column for registering name and description. Find the permitted maximum field size in these columns. Take into account that the maximum length may be controlled by using a CHECK constraint. Make sure that the permitted maximum field sizes are sufficiently different.

General License: MIT (opens in new tab)

#626. Name contains only consonants and digits

INFORMATION_SCHEMA+system catalog base tables

Find names of database objects that contain only consonants and digits.

Problem detection License: MIT (opens in new tab)

#627. Name does not contain any vowels

INFORMATION_SCHEMA+system catalog base tables

Find names of database objects that do not contain any vowels.

Problem detection License: MIT (opens in new tab)

#628. Name does not contain any vowels (aggregate view)

INFORMATION_SCHEMA+system catalog base tables

Find aggregate information about the names of database objects that do not contain any vowels.

Sofware measure License: MIT (opens in new tab)

#629. Names of character classes are not in the lowercase

INFORMATION_SCHEMA+system catalog base tables

Find 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 detection License: MIT (opens in new tab)

#630. Names of columns that hold personal names but do not take into account cultural diversity

system catalog base tables only

Find columns of tables (base tables, views, materialized views, foreign tables) that have the name first_name or last_name. Such column names do not take into account that different cultures use different personal name components and the number of possible components is more than two. If in a culture, the surname is presented before the given name, then the column names causes confusion.

Problem detection License: MIT (opens in new tab)

#631. Names of constraints (directly connected to a base table) and non-unique indexes that do not contain the associated column name

system catalog base tables only

Find constraints that are perhaps badly named. Find names of constraints (directly connected to a base table) and non-unique indexes that do not contain the associated column name.

Problem detection License: MIT (opens in new tab)

#632. Names of constraints (directly connected to a base table) that do not contain the table name

system catalog base tables only

Find 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 detection License: MIT (opens in new tab)

#633. Names of database objects (regular identifiers) that contain $

INFORMATION_SCHEMA+system catalog base tables

Find names (identifiers) of user-defined database objects that are regular identifiers and contain the $ sign starting from the second position. "Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable." (PostgreSQL manual)

Problem detection License: MIT (opens in new tab)

#634. Names of database objects that are fully uppercase

INFORMATION_SCHEMA+system catalog base tables

Full uppercase means screaming and it makes comprehending the names more difficult. Find the names (identifiers) of user-defined database objects that are fully uppercase. Because PostgreSQL stores regular identifiers lowercase in the system catalog it also means that these are delimited identifiers, i.e., these are case sensitive.

Problem detection License: MIT (opens in new tab)

#635. Names of database objects that are used to manage the state of main objects in the database

INFORMATION_SCHEMA+system catalog base tables

"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 naming must be consistent. One should avoid mixing synonyms like "seisund", "staatus", and "olek" in Estonian or "state" and "status" in English and stick with one term.

General License: MIT (opens in new tab)

#636. Names of database objects that contain a digit

INFORMATION_SCHEMA+system catalog base tables

Find the names (identifiers) of user-defined database objects that contain at least one digit. Names should be informative. Duplicates should be avoided. Digits in names are a possible sign of duplication of database objects or unclear names.

General License: MIT (opens in new tab)

#637. Names of database objects that contain dollar sign

INFORMATION_SCHEMA+system catalog base tables

Find names of database objects that contain a dollar sign ($) that is not the first symbol of the name. In PostgreSQL regular identifiers cannot start with $. However, $ can be used in other positions of the name. "Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable." (PostgreSQL documentation)

Problem detection License: MIT (opens in new tab)

#638. Names of database objects that end with an underscore

INFORMATION_SCHEMA+system catalog base tables

Find names of database objects that end with a underscore.

Problem detection License: MIT (opens in new tab)

#639. Names of database objects that mix snake_case and camelCase/PascalCase

INFORMATION_SCHEMA+system catalog base tables

Use consistent style of naming. Prefer snake_case. Regular identifiers are stored in the PostgreSQL system catalog in lowercase. Thus, if you use, for instance the identifier thisIsLongTableName, then, for instance,in the pg_dump result you will see the table name thisislongtablename. If the name in the system catalog is thisIsLongTableName, then it means that the name is a delimited identifier, i.e., case sensitive.

Problem detection License: MIT (opens in new tab)

#640. Names of database objects that start with an underscore

INFORMATION_SCHEMA+system catalog base tables

Improve the readability of names. Find the names (identifiers) of user-defined database objects that start with an underscore. This is not necessarily a mistake. For instance, parameter names could start with an underscore. On the other hand, it could be that the prefix is missing in the name.

General License: MIT (opens in new tab)
# Name Goal Type Data source Last update (sorted descending) License Actions
621 Multiple RETURNING clauses in a SQL function Find SQL functions that have multiple statements with the RETURNING clause. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
622 Multiple selects from the same table in a routine Code should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of selecting different fields of the same row with different SELECT INTO statements one should try to do it with one statement. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
623 Multiple triggers that update tsvector values Find base tables that have multiple triggers to update tsvector values. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
624 Multiple updates of the same table in a routine Code should be as compact as possible and system should make as little work as necessary in order to solve a task. Thus, instead of updating different fields of the same table with different UPDATE statements one should try to do it with one statement. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
625 Name and description maximum length Find tables where is both a column for registering name and description. Find the permitted maximum field size in these columns. Take into account that the maximum length may be controlled by using a CHECK constraint. Make sure that the permitted maximum field sizes are sufficiently different. General INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
626 Name contains only consonants and digits Find names of database objects that contain only consonants and digits. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
627 Name does not contain any vowels Find names of database objects that do not contain any vowels. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
628 Name does not contain any vowels (aggregate view) Find aggregate information about the names of database objects that do not contain any vowels. Sofware measure INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
629 Names of character classes are not in the lowercase Find 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 detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
630 Names of columns that hold personal names but do not take into account cultural diversity Find columns of tables (base tables, views, materialized views, foreign tables) that have the name first_name or last_name. Such column names do not take into account that different cultures use different personal name components and the number of possible components is more than two. If in a culture, the surname is presented before the given name, then the column names causes confusion. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
631 Names of constraints (directly connected to a base table) and non-unique indexes that do not contain the associated column name Find constraints that are perhaps badly named. Find names of constraints (directly connected to a base table) and non-unique indexes that do not contain the associated column name. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
632 Names of constraints (directly connected to a base table) that do not contain the table name Find 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 detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
633 Names of database objects (regular identifiers) that contain $ Find names (identifiers) of user-defined database objects that are regular identifiers and contain the $ sign starting from the second position. "Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable." (PostgreSQL manual) Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
634 Names of database objects that are fully uppercase Full uppercase means screaming and it makes comprehending the names more difficult. Find the names (identifiers) of user-defined database objects that are fully uppercase. Because PostgreSQL stores regular identifiers lowercase in the system catalog it also means that these are delimited identifiers, i.e., these are case sensitive. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
635 Names of database objects that are used to manage the state of main objects in the database "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 naming must be consistent. One should avoid mixing synonyms like "seisund", "staatus", and "olek" in Estonian or "state" and "status" in English and stick with one term. General INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
636 Names of database objects that contain a digit Find the names (identifiers) of user-defined database objects that contain at least one digit. Names should be informative. Duplicates should be avoided. Digits in names are a possible sign of duplication of database objects or unclear names. General INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
637 Names of database objects that contain dollar sign Find names of database objects that contain a dollar sign ($) that is not the first symbol of the name. In PostgreSQL regular identifiers cannot start with $. However, $ can be used in other positions of the name. "Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable." (PostgreSQL documentation) Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
638 Names of database objects that end with an underscore Find names of database objects that end with a underscore. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
639 Names of database objects that mix snake_case and camelCase/PascalCase Use consistent style of naming. Prefer snake_case. Regular identifiers are stored in the PostgreSQL system catalog in lowercase. Thus, if you use, for instance the identifier thisIsLongTableName, then, for instance,in the pg_dump result you will see the table name thisislongtablename. If the name in the system catalog is thisIsLongTableName, then it means that the name is a delimited identifier, i.e., case sensitive. Problem detection INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)
640 Names of database objects that start with an underscore Improve the readability of names. Find the names (identifiers) of user-defined database objects that start with an underscore. This is not necessarily a mistake. For instance, parameter names could start with an underscore. On the other hand, it could be that the prefix is missing in the name. General INFORMATION_SCHEMA+system catalog base tables MIT (opens in new tab) View (opens in new tab)