| Goal | Find a numerical measure that describes the extent of the database public interface (virtual data layer) through which users access the database. |
|---|---|
| Notes | Refers to the column pg_proc.prokind and thus works starting from PostgreSQL 11. The query does not consider the routines that are a part of an extension. The query considers only routines that are written in SQL or PL/pgSQL. The query only considers functions and procedures, i.e., does not consider aggregate and window functions. The query uses newline characters as the separator based on which to split routine body text into table. The query also considers routines with SQL-standard bodies, which are permitted starting from PostgreSQL 14. In case of using it prior PostgreSQL 14, one should replace the expression "CASE WHEN pg_proc.prosqlbody IS NULL THEN pg_proc.prosrc ELSE pg_get_function_sqlbody(pg_proc.oid) END" with "pg_proc.prosrc". |
| Type | Sofware measure Numeric values (software measures) about the database |
| License | MIT (opens in new tab) |
| Data Source | INFORMATION_SCHEMA+system catalog |
| SQL Query |
|
Collections
This query belongs to the following collections:
Find problems by overview
Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not .
Find quick numeric overview of the database
Queries that return numeric values showing mostly the number of different types of database objects in the database
| Name | Description |
|---|---|
| Find problems by overview | Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not . |
| Find quick numeric overview of the database | Queries that return numeric values showing mostly the number of different types of database objects in the database |
Categories
This query is classified under the following categories:
User-defined routines
Queries of this category provide information about the user-defined routines
| Name | Description |
|---|---|
| User-defined routines | Queries of this category provide information about the user-defined routines |
Further reading and related materials: