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

AND
AND
AND
ANDFrom where does the query gets its information?
AND
AND

There are 961 queries.

Seq nrNameGoalTypeData sourceLast updateLicense...
101All column DEFAULT valuesFind all the default values of base table, view, and foreign table columns.GeneralINFORMATION_SCHEMA only2022-10-31 10:18MIT License
102Different ways how to find default timestamp valuesFind all the default values of base table, view, and foreign table columns that are expressions invoking a function that returns a timestamp. Do it only if there are different expressions, i.e., there could be possible inconsistencies.Problem detectionINFORMATION_SCHEMA only2023-12-08 16:08MIT License
103All key constraintsFind all the primary key and unique constraints of base tables.Generalsystem catalog base tables only2021-10-16 10:37MIT License
104All user schemasFind all the schemas in the database that are not used for the system purposes.GeneralINFORMATION_SCHEMA only2022-11-04 15:14MIT License
105UPDATE triggersFind all UPDATE triggers. Make sure that they specify a correct set of columns in which data modification will fire the trigger.GeneralINFORMATION_SCHEMA only2023-12-22 09:47MIT License
106All user mappingsFind all user mappings for foreign servers and tablesGeneralsystem catalog base tables only2020-11-11 17:00MIT License
107All updatable viewsFind all views through which it is possible to modify data in base tables. Is_insertable_into and is_updatable show as to whether the view is naturally updatable in PostgreSQL or has associated rules that make sure that INSERT/UPDATE/DELETE operations against the view will not cause an error. Please note that the rule could be DO INSTEAD NOTHING rule, i.e., data modification through the view does not cause an error but the data is not actually modified. If the updatability is achieved due to rules, then is_updatable=YES if the view has both UPDATE and DELETE rule that make sure that UPDATE and DELETE operations do not cause an error.GeneralINFORMATION_SCHEMA only2024-01-14 17:09MIT License
108The total number of physical lines of code in the bodies of user-defined SQL and PL/pgSQL functions/proceduresFind a numerical measure that describes the extent of the database public interface (virtual data layer) through which users access the database.Sofware measureINFORMATION_SCHEMA+system catalog base tables2021-11-04 21:02MIT License
109Middle-manFind a routine that's only task is to invoke another routine. If a routine performs only one action, delegating work to another routine, why does it exist at all?Problem detectionINFORMATION_SCHEMA+system catalog base tables2021-11-05 12:48MIT License
110Inconsistent means of concatenation in various database objectsFind as to different database objects use different means to concatenate text (format function, concat function, concat_ws function, || operator).Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-10-28 17:36MIT License
111Perhaps unnecessary privileges to use the databaseFind 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 detectionsystem catalog base tables only2021-11-23 20:42MIT License
112Inconsistent use of length and char_length functionsFind as to whether both functions length and char_length are used in the database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-11-10 14:38MIT License
113Inconsistent use of session_user and current_user functionsFind as to whether both functions session_user and current_user are used in the database.Problem detectionINFORMATION_SCHEMA+system catalog base tables2023-12-30 11:37MIT License
114Inconsistent data type usage in case of registering sums of moneyFind 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 detectionINFORMATION_SCHEMA only2021-03-21 18:32MIT License
115Inconsistent field sizes of columns for addressesFind as to whether columns for holding e-mail addresses, phone numbers, ip addresses, zip codes, ordinary addresses, or file addresses have inconsistent field sizes across tables.Problem detectionINFORMATION_SCHEMA only2023-11-01 12:53MIT License
116Inconsistent time zone and precision usage in case of registering timesFind as to whether different data types (with and without timezone) and precisions are used in case of registering times in different columns.Problem detectionINFORMATION_SCHEMA only2023-11-04 12:30MIT License
117Inconsistent time zone and precision usage in case of registering timestampsFind as to whether different data types (with and without timezone) and precisions are used in case of registering timestamps in different columns.Problem detectionINFORMATION_SCHEMA only2023-11-04 12:28MIT License
118Inconsistent precision and scale usage in case of registering sums of moneyFind as to whether different precisions/scales are used in case of registering data about sums of money in different columns.Problem detectionINFORMATION_SCHEMA only2021-03-29 13:07MIT License
119Inconsistent 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
120Inconsistent 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 tables2023-11-01 11:57MIT License