支援的版本: 目前 (17) / 16 / 15 / 14 / 13
開發版本: devel
不支援的版本: 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4

35.45. routines #

檢視 routines 包含目前資料庫中的所有函式和程序。只會顯示目前使用者有權存取的那些函式和程序(透過身為擁有者或擁有某些權限)。

表 35.43. routines 欄位

欄位 類型

描述

specific_catalog sql_identifier

包含函式的資料庫名稱(永遠是目前的資料庫)

specific_schema sql_identifier

包含函式的綱要名稱

specific_name sql_identifier

函式的「特定名稱」。這是在綱要中唯一識別函式的名稱,即使函式的實際名稱已多載。特定名稱的格式未定義,它應該只用於將其與特定常式名稱的其他執行個體進行比較。

routine_catalog sql_identifier

包含函式的資料庫名稱(永遠是目前的資料庫)

routine_schema sql_identifier

包含函式的綱要名稱

routine_name sql_identifier

函式的名稱(在多載的情況下可能會重複)

routine_type character_data

函式為 FUNCTION,程序為 PROCEDURE

module_catalog sql_identifier

適用於 PostgreSQL 中不可用的功能

module_schema sql_identifier

適用於 PostgreSQL 中不可用的功能

module_name sql_identifier

適用於 PostgreSQL 中不可用的功能

udt_catalog sql_identifier

適用於 PostgreSQL 中不可用的功能

udt_schema sql_identifier

適用於 PostgreSQL 中不可用的功能

udt_name sql_identifier

適用於 PostgreSQL 中不可用的功能

data_type character_data

函式的傳回資料類型,如果是內建類型,則為 ARRAY(如果它是某個陣列,在這種情況下,請參閱檢視 element_types),否則為 USER-DEFINED(在這種情況下,類型在 type_udt_name 和關聯的欄位中識別)。程序為 Null。

character_maximum_length cardinal_number

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

character_octet_length cardinal_number

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

character_set_catalog sql_identifier

適用於 PostgreSQL 中不可用的功能

character_set_schema sql_identifier

適用於 PostgreSQL 中不可用的功能

character_set_name sql_identifier

適用於 PostgreSQL 中不可用的功能

collation_catalog sql_identifier

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

collation_schema sql_identifier

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

collation_name sql_identifier

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

numeric_precision cardinal_number

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

numeric_precision_radix cardinal_number

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

numeric_scale cardinal_number

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

datetime_precision cardinal_number

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

interval_type character_data

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

interval_precision cardinal_number

永遠為 null,因為此資訊不適用於 PostgreSQL 中的傳回資料類型

type_udt_catalog sql_identifier

函式的傳回資料類型定義所在的資料庫名稱(永遠是目前的資料庫)。程序為 Null。

type_udt_schema sql_identifier

函式的傳回資料類型定義所在的綱要名稱。程序為 Null。

type_udt_name sql_identifier

函式的傳回資料類型名稱。程序為 Null。

scope_catalog sql_identifier

適用於 PostgreSQL 中不可用的功能

scope_schema sql_identifier

適用於 PostgreSQL 中不可用的功能

scope_name sql_identifier

適用於 PostgreSQL 中不可用的功能

maximum_cardinality cardinal_number

永遠為 null,因為陣列在 PostgreSQL 中永遠具有無限制的最大基數

dtd_identifier sql_identifier

此函數回傳資料型別描述子的識別碼,在與此函數相關的資料型別描述子中是唯一的。這主要用於與此類識別碼的其他實例進行連結。(識別碼的具體格式未定義,並且不保證在未來的版本中保持不變。)

routine_body character_data

如果函數是 SQL 函數,則為 SQL,否則為 EXTERNAL

routine_definition character_data

函數的原始程式碼(如果函數不屬於目前啟用的角色,則為 null)。(根據 SQL 標準,此欄位僅在 routine_bodySQL 時適用,但在 PostgreSQL 中,它將包含建立函數時指定的任何原始程式碼。)

external_name character_data

如果此函數是 C 函數,則為該函數的外部名稱(連結符號);否則為 null。(這與 routine_definition 中顯示的值相同。)

external_language character_data

函數使用的程式語言

parameter_style character_data

永遠為 GENERAL。(SQL 標準定義了其他參數樣式,但在 PostgreSQL 中不可用。)

is_deterministic yes_or_no

如果函數宣告為 immutable(在 SQL 標準中稱為 deterministic),則為 YES,否則為 NO。(您無法通過資訊綱要查詢 PostgreSQL 中提供的其他 volatility 等級。)

sql_data_access character_data

永遠為 MODIFIES,表示函數可能會修改 SQL 資料。此資訊對於 PostgreSQL 沒有用處。

is_null_call yes_or_no

如果函數在任何參數為 null 時自動回傳 null,則為 YES,否則為 NO。對於程序來說為 Null。

sql_path character_data

適用於 PostgreSQL 中不可用的功能

schema_level_routine yes_or_no

永遠為 YES(相反的將是用戶定義型別的方法,這是 PostgreSQL 中不可用的功能。)

max_dynamic_result_sets cardinal_number

適用於 PostgreSQL 中不可用的功能

is_user_defined_cast yes_or_no

適用於 PostgreSQL 中不可用的功能

is_implicitly_invocable yes_or_no

適用於 PostgreSQL 中不可用的功能

security_type character_data

如果函數以目前使用者的權限執行,則為 INVOKER,如果函數以定義它的使用者的權限執行,則為 DEFINER

to_sql_specific_catalog sql_identifier

適用於 PostgreSQL 中不可用的功能

to_sql_specific_schema sql_identifier

適用於 PostgreSQL 中不可用的功能

to_sql_specific_name sql_identifier

適用於 PostgreSQL 中不可用的功能

as_locator yes_or_no

適用於 PostgreSQL 中不可用的功能

created time_stamp

適用於 PostgreSQL 中不可用的功能

last_altered time_stamp

適用於 PostgreSQL 中不可用的功能

new_savepoint_level yes_or_no

適用於 PostgreSQL 中不可用的功能

is_udt_dependent yes_or_no

目前永遠為 NO。替代方案 YES 適用於 PostgreSQL 中不可用的功能。

result_cast_from_data_type character_data

適用於 PostgreSQL 中不可用的功能

result_cast_as_locator yes_or_no

適用於 PostgreSQL 中不可用的功能

result_cast_char_max_length cardinal_number

適用於 PostgreSQL 中不可用的功能

result_cast_char_octet_length cardinal_number

適用於 PostgreSQL 中不可用的功能

result_cast_char_set_catalog sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_char_set_schema sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_char_set_name sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_collation_catalog sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_collation_schema sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_collation_name sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_numeric_precision cardinal_number

適用於 PostgreSQL 中不可用的功能

result_cast_numeric_precision_radix cardinal_number

適用於 PostgreSQL 中不可用的功能

result_cast_numeric_scale cardinal_number

適用於 PostgreSQL 中不可用的功能

result_cast_datetime_precision cardinal_number

適用於 PostgreSQL 中不可用的功能

result_cast_interval_type character_data

適用於 PostgreSQL 中不可用的功能

result_cast_interval_precision cardinal_number

適用於 PostgreSQL 中不可用的功能

result_cast_type_udt_catalog sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_type_udt_schema sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_type_udt_name sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_scope_catalog sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_scope_schema sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_scope_name sql_identifier

適用於 PostgreSQL 中不可用的功能

result_cast_maximum_cardinality cardinal_number

適用於 PostgreSQL 中不可用的功能

result_cast_dtd_identifier sql_identifier

適用於 PostgreSQL 中不可用的功能


提交更正

如果您在文件中發現任何不正確、與您使用特定功能的經驗不符或需要進一步澄清的地方,請使用此表單來報告文件問題。