Filter Queries

Found 997 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.

# Name Goal Type Data source Last update License
501 Names of the columns of derived tables that have been given by the system Find columns of derived tables that name has been given by the system. The creators of the table should specify the name themselves to avoid ugly names and nasty surprises. Problem detection INFORMATION_SCHEMA+system catalog base tables 2022-11-15 16:48 MIT License View
502 Names of the password columns Find names of columns of base tables, views, and materialized views that contain passwords. Make sure that the naming is consistent, General INFORMATION_SCHEMA+system catalog base tables 2022-11-30 15:04 MIT License View
503 Names of triggers and rules that do contain the table name The names should contain table name in order to make the names better understandable. General INFORMATION_SCHEMA+system catalog base tables 2023-01-13 19:23 MIT License View
504 Names of triggers and rules that do not contain the table name The names should contain table name in order to make the names better understandable. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-01-13 19:18 MIT License View
505 Name starts or ends with spaces Find the names of user-defined database objects (must be delimited identifiers) that start or end with spaces. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-21 16:45 MIT License View
506 Naming of declarative base table constraints Find the names of declarative base table constraints. Naming of constraints must be consistent. For instance, do not mix system-defined and user-defined names. General INFORMATION_SCHEMA+system catalog base tables 2021-11-17 20:11 MIT License View
507 Naming of tables Find the names of different types (base table, foreign table, view, materialized view) of tables. Naming of tables must be consistent. For instance, do not mix names in plural and singular form within the same table type. General INFORMATION_SCHEMA+system catalog base tables 2021-11-17 20:13 MIT License View
508 No need to use to_date or to_timestamp function Find expressions where a date literal with the ISO format is converted to date/timestamp by using to_date or to_timestamp function. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:29 MIT License View
509 Non-foreign key base table columns with the same name have a different set of CHECK constraints Find non-foreign key base table columns that have the same name but a different set of check constraints. The use of constraints should be consistent and all the necessary constraints must be enforced. "If you do something a certain way, do all similar things in the same way." (Robert C. Martin, Clean Code) Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-11-24 12:06 MIT License View
510 Non-foreign key indexes that have been named as foreign key indexes Find indexes that are not on a foreign key column but the name of the index contains ixfk or idxfk. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-23 12:12 MIT License View
511 Non-key and non-foreign key base table columns with the same name and type that have in some cases permit NULLs and in some cases not Find non-key and non-foreign key base table columns with the same name and type that in some cases permit NULLs and in some cases not. Be consistent. Make sure that this selection is consistent. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:29 MIT License View
512 Non-predefined character classes must not be between double square brackets Write 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 detection INFORMATION_SCHEMA+system catalog base tables 2023-11-13 12:32 MIT License View
513 Non-updatable views that have data modification privileges Be precise and do not give impossible privileges. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-02-25 17:29 MIT License View
514 Non-updatable views with DO INSTEAD NOTHING rules Find non-updatable views that have a DO INSTEAD NOTHING rule. The rule is used to prevent updates. However, the view is aniway non-updatable. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-10-28 13:01 MIT License View
515 No point to have in a procedure COMMIT without ROLLBACK or vice versa If you end transaction in a procedure, then there should be a possibility to either commit or rollback the transaction based on some condition. Procedures appeared in PostgreSQL 11. Problem detection INFORMATION_SCHEMA+system catalog base tables 2021-11-04 12:00 MIT License View
516 Not equals check in unstandardized way Find user-defined routines that use != operator to test as to whether two values are not equal. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-12-13 14:16 MIT License View
517 NOT IN or <> ALL in derived tables Avoid using NOT IN or <>ALL with a non-correlated subquery in PostgreSQL because the query performance will be very poor, especially in case of large data sizes. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-24 13:50 MIT License View
518 NOT IN or <> ALL in routines Avoid using NOT IN or <>ALL with a non-correlated subquery in PostgreSQL because the query performance will be very poor. Problem detection INFORMATION_SCHEMA+system catalog base tables 2024-12-24 13:50 MIT License View
519 NOT NULL constraint is directly associated with a column instead of the domain of the column Find mandatory (NOT NULL) base table columns that have been defined based on the same domain but the NOT NULL constraint is associated directly with the column not to the domain. PostgreSQL CREATE DOMAIN statement documentation points out that it is possible to add NULL's to columns that have a NOT NULL domain and thus suggests to associate NOT NULL constraints with a column instead of the domain. However, this is a non-standard behavior and defeats the idea of domain as a reusable asset. The scenarios where NULLs can appear in columns with a NOT NULL domain are quite exotic and probably cannot appear in production environments. Problem detection INFORMATION_SCHEMA+system catalog base tables 2023-10-20 15:34 MIT License View
520 NOT NULL domains Find domains with NOT NULL constraints and base table columns that have been defined based on the domain. PostgreSQL CREATE DOMAIN statement documentation points out that it is possible to add NULL's to columns that have a NOT NULL domain and thus suggests to associate NOT NULL constraints with a column instead of the domain. However, this is a non-standard behavior and defeats the idea of domain as a reusable asset. The scenarios where NULLs can appear in columns with a NOT NULL domain are quite exotic and probably cannot appear in production environments. General INFORMATION_SCHEMA+system catalog base tables 2023-10-20 19:10 MIT License View