Filter Queries

Found 1056 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 the relatively small amount of data in the system catalog of a database.

#1041. Too generic names (unique index columns)

system catalog base tables only

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

#1042. Too generic names (unique indexes)

system catalog base tables only

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

#1043. Too generic names (user-defined types, domains)

system catalog base tables only

Find names of user-defined types and domains that contain too generic (noise) words.

Problem detection License: MIT (opens in new tab)

#1044. Too short table constraint names

system catalog base tables only

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

#1045. Too wide composite indexes

system catalog base tables only

Find composite indexes that do not support any constraint but are on more than three columns.

Problem detection License: MIT (opens in new tab)

#1046. Triggers that are used to calculate tsvector values react to a wrong set of events

system catalog base tables only

Find triggers on base tables that are used to calculate tsvector values that react to a wrong set of events, i.e., react to the DELETE event or do not react to the INSERT and UPDATE events.

Problem detection License: MIT (opens in new tab)

#1047. Unlogged tables

system catalog base tables only

Find unlogged tables. These may improve the performance of INSERT operations, but with the price of possibly loosing data - an unlogged table is automatically truncated after a crash or unclean shutdown.

General License: MIT (opens in new tab)

#1048. Unnecessary use of gist index type in case of an exclude constraint

system catalog base tables only

Find exclude constraints that are based on the gist index type although the default b-tree index type would have been enough.

Problem detection License: MIT (opens in new tab)

#1049. Unused composite types (for table columns, typed tables, input and output parameters)

system catalog base tables only

Find user-defined composite types that are not used in case of any table, column, and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.

Problem detection License: MIT (opens in new tab)

#1050. Unused domains (for base table columns and parameters)

system catalog base tables only

Find domains that are not used in case of any base table column and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.

Problem detection License: MIT (opens in new tab)

#1051. Unused schemas

system catalog base tables only

Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code.

Problem detection License: MIT (opens in new tab)

#1052. User-defined composite types

system catalog base tables only

Find composite types that are created by a user, i.e., the type is not created automatically by the database management system based on a relation.

General License: MIT (opens in new tab)

#1053. Using system-defined names of constraints (constraints that involve more than one column)

system catalog base tables only

Find the constraint types in case of which there exists system-defined names.

Problem detection License: MIT (opens in new tab)

#1054. Using system-defined names of constraints (constraints that involve one column)

system catalog base tables only

Find the constraint types in case of which there exists system-defined names.

Problem detection License: MIT (opens in new tab)

#1055. Vacuum and analyze status of base tables

system catalog base tables only

Find for each base table the last time when the table has been vacuumed or analyzed (either manually or automatically).

General License: MIT (opens in new tab)

#1056. Views with security invoker

system catalog base tables only

Find views that have the security invoker option. Such option is possible starting from PostgreSQL 15. In case of using such views one cannot create a system where data is accessed through views and the users (applications) do not have direct access to the base tables.

Problem detection License: MIT (opens in new tab)
# Name(activate to sort ascending) Goal(activate to sort ascending) Type(activate to sort ascending) Data source(sorted ascending, activate to sort descending) Last update(activate to sort ascending) License Actions
1041 Too 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 detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1042 Too 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 detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1043 Too generic names (user-defined types, domains) Find names of user-defined types and domains that contain too generic (noise) words. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1044 Too short table constraint names The 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 detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1045 Too wide composite indexes Find composite indexes that do not support any constraint but are on more than three columns. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1046 Triggers that are used to calculate tsvector values react to a wrong set of events Find triggers on base tables that are used to calculate tsvector values that react to a wrong set of events, i.e., react to the DELETE event or do not react to the INSERT and UPDATE events. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1047 Unlogged tables Find unlogged tables. These may improve the performance of INSERT operations, but with the price of possibly loosing data - an unlogged table is automatically truncated after a crash or unclean shutdown. General system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1048 Unnecessary use of gist index type in case of an exclude constraint Find exclude constraints that are based on the gist index type although the default b-tree index type would have been enough. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1049 Unused composite types (for table columns, typed tables, input and output parameters) Find user-defined composite types that are not used in case of any table, column, and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1050 Unused domains (for base table columns and parameters) Find domains that are not used in case of any base table column and routine (input or otput) parameter (as their type). Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1051 Unused schemas Do not keep in your database elements that are not needed by anybody. These should be put in use or dropped, otherwise these are dead code. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1052 User-defined composite types Find composite types that are created by a user, i.e., the type is not created automatically by the database management system based on a relation. General system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1053 Using system-defined names of constraints (constraints that involve more than one column) Find the constraint types in case of which there exists system-defined names. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1054 Using system-defined names of constraints (constraints that involve one column) Find the constraint types in case of which there exists system-defined names. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1055 Vacuum and analyze status of base tables Find for each base table the last time when the table has been vacuumed or analyzed (either manually or automatically). General system catalog base tables only MIT (opens in new tab) View (opens in new tab)
1056 Views with security invoker Find views that have the security invoker option. Such option is possible starting from PostgreSQL 15. In case of using such views one cannot create a system where data is accessed through views and the users (applications) do not have direct access to the base tables. Problem detection system catalog base tables only MIT (opens in new tab) View (opens in new tab)