支援的版本:目前 (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 章。資訊綱要

目錄

35.1。綱要
35.2。資料類型
35.3。 information_schema_catalog_name
35.4。 administrable_role_​authorizations
35.5。 applicable_roles
35.6。 attributes
35.7。 character_sets
35.8。 check_constraint_routine_usage
35.9。 check_constraints
35.10。 collations
35.11。 collation_character_set_​applicability
35.12。 column_column_usage
35.13。 column_domain_usage
35.14。 column_options
35.15。 column_privileges
35.16。 column_udt_usage
35.17。 columns
35.18。 constraint_column_usage
35.19。 constraint_table_usage
35.20。 data_type_privileges
35.21。 domain_constraints
35.22。 domain_udt_usage
35.23。 domains
35.24。 element_types
35.25。 enabled_roles
35.26。 foreign_data_wrapper_options
35.27。 foreign_data_wrappers
35.28。 foreign_server_options
35.29。 foreign_servers
35.30。 foreign_table_options
35.31。 foreign_tables
35.32。 key_column_usage
35.33。 parameters
35.34。 referential_constraints
35.35。 role_column_grants
35.36。 role_routine_grants
35.37。 role_table_grants
35.38。 role_udt_grants
35.39。 role_usage_grants
35.40。 routine_column_usage
35.41。 routine_privileges
35.42。 routine_routine_usage
35.43。 routine_sequence_usage
35.44。 routine_table_usage
35.45。 routines
35.46。 schemata
35.47。 sequences
35.48。 sql_features
35.49。 sql_implementation_info
35.50。 sql_parts
35.51。 sql_sizing
35.52。 table_constraints
35.53。 table_privileges
35.54。 tables
35.55。 transforms
35.56。 triggered_update_columns
35.57。 triggers
35.58。 udt_privileges
35.59。 usage_privileges
35.60。 user_defined_types
35.61。 user_mapping_options
35.62。 user_mappings
35.63。 view_column_usage
35.64。 view_routine_usage
35.65。 view_table_usage
35.66。 views

資訊綱要由一組檢視表組成,其中包含有關目前資料庫中定義的物件的資訊。 資訊綱要是在 SQL 標準中定義的,因此可以預期它是可移植且保持穩定的 — 不像系統目錄,它是 PostgreSQL 特有的,並且是根據實作考量而建立的。 然而,資訊綱要檢視表不包含有關 PostgreSQL 特定功能的資訊; 要查詢這些資訊,您需要查詢系統目錄或其他 PostgreSQL 特定的檢視表。

注意

當查詢資料庫以取得約束資訊時,符合標準的查詢可能會傳回多個資料列,而不是預期的單一資料列。 這是因為 SQL 標準要求約束名稱在綱要中必須是唯一的,但 PostgreSQL 並未強制執行此限制。PostgreSQL 自動產生的約束名稱可避免在同一綱要中出現重複,但使用者可以指定此類重複名稱。

當查詢資訊綱要檢視表(例如 check_constraint_routine_usagecheck_constraintsdomain_constraintsreferential_constraints)時,可能會出現此問題。 某些其他檢視表具有類似的問題,但包含表格名稱以協助區分重複的資料列,例如,constraint_column_usageconstraint_table_usagetable_constraints

提交更正

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