From dfe65ace27a5b2e11511e5d929eea356c8ca89e5 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 29 Nov 2023 14:56:41 +0100 Subject: [PATCH] doc: Update info on information schema usage tables Commit f40c6969d0 added the information schema usage tables but added documentation that they did not fully work yet. Commit e717a9a18b then added SQL-standard function bodies, which made the information schema views fully functional, but it neglected to update the documentation. This is now done here. Reported-by: Erki Eessaar Discussion: https://www.postgresql.org/message-id/flat/AM9PR01MB8268EC7B696F9FE346CA5B93FEB8A%40AM9PR01MB8268.eurprd01.prod.exchangelabs.com TODO: backpatch 14+ --- doc/src/sgml/information_schema.sgml | 30 +++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml index 9c39e9aab5..0ca7d5a9e0 100644 --- a/doc/src/sgml/information_schema.sgml +++ b/doc/src/sgml/information_schema.sgml @@ -4846,9 +4846,11 @@ <structname>role_usage_grants</structname> Columns <literal>routine_column_usage</literal> - The view routine_column_usage is meant to identify all - columns that are used by a function or procedure. This information is - currently not tracked by PostgreSQL. + The view routine_column_usage identifies all columns + that are used by a function or procedure, either in the SQL body or in + parameter default expressions. (This only works for unquoted SQL bodies, + not quoted bodies or functions in other languages.) A column is only + included if its table is owned by a currently enabled role. @@ -5085,12 +5087,12 @@ <structname>routine_privileges</structname> Columns<literal>routine_routine_usage</literal> - The view routine_routine_usage is meant to identify all - functions or procedures that are used by another (or the same) function or - procedure, either in the body or in parameter default expressions. - Currently, only functions used in parameter default expressions are - tracked. An entry is included here only if the used function is owned by a - currently enabled role. (There is no such restriction on the using + The view routine_routine_usage identifies all functions + or procedures that are used by another (or the same) function or procedure, + either in the SQL body or in parameter default expressions. (This only + works for unquoted SQL bodies, not quoted bodies or functions in other + languages.) An entry is included here only if the used function is owned + by a currently enabled role. (There is no such restriction on the using function.) @@ -5184,11 +5186,11 @@ <literal>routine_routine_usage</literal> Columns<literal>routine_sequence_usage</literal> - The view routine_sequence_usage is meant to identify all - sequences that are used by a function or procedure, either in the body or - in parameter default expressions. Currently, only sequences used in - parameter default expressions are tracked. A sequence is only included if - that sequence is owned by a currently enabled role. + The view routine_sequence_usage identifies all sequences + that are used by a function or procedure, either in the SQL body or in + parameter default expressions. (This only works for unquoted SQL bodies, + not quoted bodies or functions in other languages.) A sequence is only + included if that sequence is owned by a currently enabled role.
-- 2.43.0