Postgresql 中文操作指南
37.42. routine_routine_usage #
视图 routine_routine_usage 标识了另一个(或同一)函数或过程使用的所有函数或过程,无论是 SQL 正文中还是参数默认表达式中。(这仅适用于未加引号的 SQL 正文,不适用于带引号的正文或其他语言中的函数。)仅当第一个函数拥有待用函数时,这里才会包含一个条目。(对该函数没有任何此类限制。)
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.)
请注意,视图中两个函数的条目都引用了例程的“特定”名称,即使列名称的使用方式与例程的其他信息模式视图不一致。这是符合 SQL 标准的,尽管可以说这是一个错误设计。有关特定名称的详细信息,请参阅 Section 37.45。
Note that the entries for both functions in the view refer to the “specific” name of the routine, even though the column names are used in a way that is inconsistent with other information schema views about routines. This is per SQL standard, although it is arguably a misdesign. See Section 37.45 for more information about specific names.
Table 37.40. routine_routine_usage Columns
Table 37.40. routine_routine_usage Columns
Column Type Description |
specific_catalog sql_identifier Name of the database containing the using function (always the current database) |
specific_schema sql_identifier Name of the schema containing the using function |
specific_name sql_identifier The “specific name” of the using function. |
routine_catalog sql_identifier Name of the database that contains the function that is used by the first function (always the current database) |
routine_schema sql_identifier Name of the schema that contains the function that is used by the first function |
routine_name sql_identifier The “specific name” of the function that is used by the first function. |