From f7ae90041ef16e2e1a5296b0cc6fed1202acf312 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sun, 2 Apr 2006 17:38:13 +0000 Subject: Update information schema for SQL:2003 and new PostgreSQL features. --- doc/src/sgml/information_schema.sgml | 1176 +++++++++++++++++++++++++++++----- 1 file changed, 1030 insertions(+), 146 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml index 57d9e1a248a..6f3498f3bec 100644 --- a/doc/src/sgml/information_schema.sgml +++ b/doc/src/sgml/information_schema.sgml @@ -1,4 +1,4 @@ - + The Information Schema @@ -92,7 +92,7 @@ time_stamp - A domain over the type timestamp + A domain over the type timestamp with time zone @@ -144,15 +144,65 @@ + + <literal>administrable_role_authorizations</literal> + + + The view administrable_role_authorizations + identifies all roles that the current user has the admin option + for. + + + + <literal>administrable_role_authorizations</literal> Columns + + + + + Name + Data Type + Description + + + + + + grantee + sql_identifier + + Name of the role to which this role membership was granted (may + be the current user, or a different role in case of nested role + memberships) + + + + + role_name + sql_identifier + Name of a role + + + + is_grantable + character_data + Always YES + + + +
+
+ <literal>applicable_roles</literal> - The view applicable_roles identifies all groups - that the current user is a member of. (A role is the same thing as - a group.) Generally, it is better to use the view - enabled_roles instead of this one; see also - there. + The view applicable_roles identifies all roles + whose privileges the current user can use. This means there is + some chain of role grants from the current user to the role in + question. The current user itself is also an applicable role. The + set of applicable roles is generally used for permission checking. + applicable role + roleapplicable @@ -169,21 +219,337 @@ - grantee - sql_identifier - Always the name of the current user + grantee + sql_identifier + + Name of the role to which this role membership was granted (may + be the current user, or a different role in case of nested role + memberships) + + + + + role_name + sql_identifier + Name of a role + + + + is_grantable + character_data + + YES if the grantee has the admin option on + the role, NO if not + + + + +
+
+ + + <literal>attributes</literal> + + + The view attributes contains information about + the attributes of composite data types defined in the database. + (Note that the view does not give information about table columns, + which are sometimes called attributes in PostgreSQL contexts.) + + + + <literal>attributes</literal> Columns + + + + + Name + Data Type + Description + + + + + + udt_catalog + sql_identifier + Name of the database containing the data type (always the current database) + + + + udt_schema + sql_identifier + Name of the schema containing the data type + + + + udt_name + sql_identifier + Name of the data type + + + + attribute_name + sql_identifier + Name of the attribute + + + + ordinal_position + cardinal_number + Ordinal position of the attribute within the data type (count starts at 1) + + + + attribute_default + character_data + Default expression of the attribute + + + + is_nullable + character_data + + YES if the attribute is possibly nullable, + NO if it is known not nullable. + + + + + data_type + character_data + + Data type of the attribute, if it is a built-in type, or + ARRAY if it is some array (in that case, see + the view element_types), else + USER-DEFINED (in that case, the type is + identified in attribute_udt_name and + associated columns). + + + + + character_maximum_length + cardinal_number + + If data_type identifies a character or bit + string type, the declared maximum length; null for all other + data types or if no maximum length was declared. + + + + + character_octet_length + cardinal_number + + If data_type identifies a character type, + the maximum possible length in octets (bytes) of a datum (this + should not be of concern to + PostgreSQL users); null for all + other data types. + + + + + numeric_precision + cardinal_number + + If data_type identifies a numeric type, this + column contains the (declared or implicit) precision of the + type for this attribute. The precision indicates the number of + significant digits. It may be expressed in decimal (base 10) + or binary (base 2) terms, as specified in the column + numeric_precision_radix. For all other data + types, this column is null. + + + + + numeric_precision_radix + cardinal_number + + If data_type identifies a numeric type, this + column indicates in which base the values in the columns + numeric_precision and + numeric_scale are expressed. The value is + either 2 or 10. For all other data types, this column is null. + + + + + numeric_scale + cardinal_number + + If data_type identifies an exact numeric + type, this column contains the (declared or implicit) scale of + the type for this attribute. The scale indicates the number of + significant digits to the right of the decimal point. It may + be expressed in decimal (base 10) or binary (base 2) terms, as + specified in the column + numeric_precision_radix. For all other data + types, this column is null. + + + + + datetime_precision + cardinal_number + + If data_type identifies a date, time, or + interval type, the declared precision; null for all other data + types or if no precision was declared. + + + + + interval_type + character_data + Not yet implemented + + + + interval_precision + character_data + Not yet implemented + + + + attribute_udt_catalog + sql_identifier + + Name of the database that the attribute data type is defined in + (always the current database) + + + + + attribute_udt_schema + sql_identifier + + Name of the schema that the attribute data type is defined in + + + + + attribute_udt_name + sql_identifier + + Name of the attribute data type + + + + + scope_catalog + sql_identifier + Applies to a feature not available in PostgreSQL + + + + scope_schema + sql_identifier + Applies to a feature not available in PostgreSQL + + + + scope_name + sql_identifier + Applies to a feature not available in PostgreSQL + + + + maximum_cardinality + cardinal_number + Always null, because arrays always have unlimited maximum cardinality in PostgreSQL + + + + dtd_identifier + sql_identifier + + An identifier of the data type descriptor of the column, unique + among the data type descriptors pertaining to the table. This + is mainly useful for joining with other instances of such + identifiers. (The specific format of the identifier is not + defined and not guaranteed to remain the same in future + versions.) + + + + + is_derived_reference_attribute + character_data + Applies to a feature not available in PostgreSQL + + + +
+ + + See also under , a similarly + structured view, for further information on some of the columns. + +
+ + + <literal>check_constraint_routine_usage</literal> + + + The view check_constraint_routine_usage + identifies routines (functions and procedures) that are used by a + check constraint. Only those routines are shown that are owned by + a currently enabled role. + + + + <literal>check_constraint_routine_usage</literal> Columns + + + + + Name + Data Type + Description + + + + + + constraint_catalog + sql_identifier + Name of the database containing the constraint (always the current database) - role_name - sql_identifier - Name of a group + constraint_schema + sql_identifier + Name of the schema containing the constraint - is_grantable - character_data - Applies to a feature not available in PostgreSQL + constraint_name + sql_identifier + Name of the constraint + + + + specific_catalog + sql_identifier + Name of the database containing the function (always the current database) + + + + specific_schema + sql_identifier + Name of the schema containing the function + + + + specific_name + sql_identifier + + The specific name of the function. See for more information. + @@ -196,8 +562,8 @@ The view check_constraints contains all check constraints, either defined on a table or on a domain, that are - owned by the current user. (The owner of the table or domain is - the owner of the constraint.) + owned by a currently enabled role. (The owner of the table or + domain is the owner of the constraint.)
@@ -247,7 +613,7 @@ The view column_domain_usage identifies all columns (of a table or a view) that make use of some domain defined - in the current database and owned by the current user. + in the current database and owned by a currently enabled role.
@@ -314,10 +680,9 @@ The view column_privileges identifies all - privileges granted on columns to the current user or by the current - user. There is one row for each combination of column, grantor, - and grantee. Privileges granted to groups are identified in the - view role_column_grants. + privileges granted on columns to a currently enabled role or by a + currently enabled role. There is one row for each combination of + column, grantor, and grantee. @@ -351,13 +716,13 @@ grantor sql_identifier - Name of the user that granted the privilege + Name of the role that granted the privilege grantee sql_identifier - Name of the user or group that the privilege was granted to + Name of the role that the privilege was granted to @@ -402,14 +767,6 @@
- - - Note that the column grantee makes no - distinction between users and groups. If you have users and groups - with the same name, there is unfortunately no way to distinguish - them. A future version of PostgreSQL - will possibly prohibit having users and groups with the same name. -
@@ -417,7 +774,7 @@ The view column_udt_usage identifies all columns - that use data types owned by the current user. Note that in + that use data types owned by a currently enabled role. Note that in PostgreSQL, built-in data types behave like user-defined types, so they are included here as well. See also for details. @@ -549,10 +906,7 @@ column_default character_data - - Default expression of the column (null if the current user is - not the owner of the table containing the column) - + Default expression of the column @@ -797,6 +1151,70 @@ character_data Applies to a feature not available in PostgreSQL + + + is_identity + character_data + Applies to a feature not available in PostgreSQL + + + + identity_generation + character_data + Applies to a feature not available in PostgreSQL + + + + identity_start + character_data + Applies to a feature not available in PostgreSQL + + + + identity_increment + character_data + Applies to a feature not available in PostgreSQL + + + + identity_maximum + character_data + Applies to a feature not available in PostgreSQL + + + + identity_minimum + character_data + Applies to a feature not available in PostgreSQL + + + + identity_cycle + character_data + Applies to a feature not available in PostgreSQL + + + + is_generated + character_data + Applies to a feature not available in PostgreSQL + + + + generation_expression + character_data + Applies to a feature not available in PostgreSQL + + + + is_updatable + character_data + + YES if the column is updatable, + NO if not (Columns in base tables are always + updatable, columns in views not necessarily) + + @@ -837,12 +1255,12 @@ The view constraint_column_usage identifies all columns in the current database that are used by some constraint. - Only those columns are shown that are contained in a table owned - the current user. For a check constraint, this view identifies the - columns that are used in the check expression. For a foreign key - constraint, this view identifies the columns that the foreign key - references. For a unique or primary key constraint, this view - identifies the constrained columns. + Only those columns are shown that are contained in a table owned by + a currently enabled role. For a check constraint, this view + identifies the columns that are used in the check expression. For + a foreign key constraint, this view identifies the columns that the + foreign key references. For a unique or primary key constraint, + this view identifies the constrained columns. @@ -922,9 +1340,9 @@ The view constraint_table_usage identifies all tables in the current database that are used by some constraint and - are owned by the current user. (This is different from the view - table_constraints, which identifies all table - constraints along with the table they are defined on.) For a + are owned by a currently enabled role. (This is different from the + view table_constraints, which identifies all + table constraints along with the table they are defined on.) For a foreign key constraint, this view identifies the table that the foreign key references. For a unique or primary key constraint, this view simply identifies the table the constraint belongs to. @@ -1072,7 +1490,7 @@ The view domain_constraints contains all - constraints belonging to domains owned by the current user. + constraints belonging to domains defined in the current database.
@@ -1144,10 +1562,11 @@ <literal>domain_udt_usage</literal> - The view domain_udt_usage identifies all columns - that use data types owned by the current user. Note that in - PostgreSQL, built-in data types behave - like user-defined types, so they are included here as well. + The view domain_udt_usage identifies all domains + that are based on data types owned by a currently enabled role. + Note that in PostgreSQL, built-in data + types behave like user-defined types, so they are included here as + well.
@@ -1695,15 +2114,23 @@ ORDER BY c.ordinal_position; <literal>enabled_roles</literal> - The view enabled_roles identifies all groups - that the current user is a member of. (A role is the same thing as - a group.) The difference between this view and - applicable_roles is that in the future there may - be a mechanism to enable and disable groups during a session. In - that case this view identifies those groups that are currently - enabled. + The view enabled_roles identifies the currently + enabled roles. The enabled roles are recursively + defined as the current user together with all roles that have been + granted to the enabled roles with automatic inheritance. In other + words, these are all roles that the current user has direct or + indirect, automatically inheriting membership in. + enabled role + roleenabled + + For permission checking, the set of applicable roles + is applied, which may be broader than the set of enabled roles. So + generally, it is better to use the view + applicable_roles instead of this one; see also + there. +
<literal>enabled_roles</literal> Columns @@ -1720,7 +2147,7 @@ ORDER BY c.ordinal_position; role_name sql_identifier - Name of a group + Name of a role @@ -1734,8 +2161,8 @@ ORDER BY c.ordinal_position; The view key_column_usage identifies all columns in the current database that are restricted by some unique, primary key, or foreign key constraint. Check constraints are not included - in this view. Only those columns are shown that are contained in a - table owned by the current user. + in this view. Only those columns are shown that the current user + has access to, by way of being the owner or having some privilege.
@@ -1813,6 +2240,14 @@ ORDER BY c.ordinal_position; starts at 1) + + + position_in_unique_constraint + cardinal_number + + Not yet implemented + +
@@ -2069,7 +2504,7 @@ ORDER BY c.ordinal_position; The view referential_constraints contains all referential (foreign key) constraints in the current database that - belong to a table owned by the current user. + belong to a table owned by a currently enabled role. @@ -2172,8 +2607,8 @@ ORDER BY c.ordinal_position; The view role_column_grants identifies all - privileges granted on columns to a group that the current user is a - member of. Further information can be found under + privileges granted on columns where the grantor or grantee is a + currently enabled role. Further information can be found under column_privileges. @@ -2193,13 +2628,13 @@ ORDER BY c.ordinal_position; grantor sql_identifier - Name of the user that granted the privilege + Name of the role that granted the privilege grantee sql_identifier - Name of the group that the privilege was granted to + Name of the role that the privilege was granted to @@ -2251,8 +2686,8 @@ ORDER BY c.ordinal_position; The view role_routine_grants identifies all - privileges granted on functions to a group that the current user is - a member of. Further information can be found under + privileges granted on functions where the grantor or grantee is a + currently enabled role. Further information can be found under routine_privileges. @@ -2272,13 +2707,13 @@ ORDER BY c.ordinal_position; grantor sql_identifier - Name of the user that granted the privilege + Name of the role that granted the privilege grantee sql_identifier - Name of the group that the privilege was granted to + Name of the role that the privilege was granted to @@ -2341,9 +2776,9 @@ ORDER BY c.ordinal_position; The view role_table_grants identifies all - privileges granted on tables or views to a group that the current - user is a member of. Further information can be found under - table_privileges. + privileges granted on tables or views where the grantor or grantee + is a currently enabled role. Further information can be found + under table_privileges.
@@ -2362,13 +2797,13 @@ ORDER BY c.ordinal_position; grantor sql_identifier - Name of the user that granted the privilege + Name of the role that granted the privilege grantee sql_identifier - Name of the group that the privilege was granted to + Name of the role that the privilege was granted to @@ -2422,12 +2857,13 @@ ORDER BY c.ordinal_position; The view role_usage_grants is meant to identify USAGE privileges granted on various kinds of - objects to a group that the current user is a member of. In - PostgreSQL, this currently only applies - to domains, and since domains do not have real privileges in - PostgreSQL, this view is empty. Further - information can be found under usage_privileges. - In the future, this view may contain more useful information. + objects to a currently enabled role or by a currently enabled role. + In PostgreSQL, this currently only + applies to domains, and since domains do not have real privileges + in PostgreSQL, this view is empty. + Further information can be found under + usage_privileges. In the future, this view may + contain more useful information.
@@ -2446,13 +2882,13 @@ ORDER BY c.ordinal_position; grantor sql_identifier - In the future, the name of the user that granted the privilege + In the future, the name of the role that granted the privilege grantee sql_identifier - In the future, the name of the group that the privilege was granted to + In the future, the name of the role that the privilege was granted to @@ -2500,10 +2936,9 @@ ORDER BY c.ordinal_position; The view routine_privileges identifies all - privileges granted on functions to the current user or by the - current user. There is one row for each combination of function, - grantor, and grantee. Privileges granted to groups are identified - in the view role_routine_grants. + privileges granted to a currently enabled role or by a currently + enabled role. There is one row for each combination of function, + grantor, and grantee.
@@ -2522,13 +2957,13 @@ ORDER BY c.ordinal_position; grantor sql_identifier - Name of the user that granted the privilege + Name of the role that granted the privilege grantee sql_identifier - Name of the user or group that the privilege was granted to + Name of the role that the privilege was granted to @@ -2584,14 +3019,6 @@ ORDER BY c.ordinal_position;
- - - Note that the column grantee makes no - distinction between users and groups. If you have users and groups - with the same name, there is unfortunately no way to distinguish - them. A future version of PostgreSQL - will possibly prohibit having users and groups with the same name. -
@@ -2877,8 +3304,8 @@ ORDER BY c.ordinal_position; routine_definition character_data - The source text of the function (null if the current user is - not the owner of the function). (According to the SQL + The source text of the function (null if the function is not + owned by a currently enabled role). (According to the SQL standard, this column is only applicable if routine_body is SQL, but in PostgreSQL it will contain @@ -2973,43 +3400,211 @@ ORDER BY c.ordinal_position; - is_implicitly_invocable - character_data + is_implicitly_invocable + character_data + Applies to a feature not available in PostgreSQL + + + + security_type + character_data + + If the function runs with the privileges of the current user, + then INVOKER, if the function runs with the + privileges of the user who defined it, then + DEFINER. + + + + + to_sql_specific_catalog + sql_identifier + Applies to a feature not available in PostgreSQL + + + + to_sql_specific_schema + sql_identifier + Applies to a feature not available in PostgreSQL + + + + to_sql_specific_name + sql_identifier + Applies to a feature not available in PostgreSQL + + + + as_locator + character_data + Applies to a feature not available in PostgreSQL + + + + created + time_stamp + Applies to a feature not available in PostgreSQL + + + + last_altered + time_stamp + Applies to a feature not available in PostgreSQL + + + + new_savepoint_level + character_data + Applies to a feature not available in PostgreSQL + + + + is_udt_dependent + character_data + Applies to a feature not available in PostgreSQL + + + + result_cast_from_data_type + character_data + Applies to a feature not available in PostgreSQL + + + + result_cast_as_locator + character_data + Applies to a feature not available in PostgreSQL + + + + result_cast_char_max_length + cardinal_number + Applies to a feature not available in PostgreSQL + + + + result_cast_char_octet_length + character_data + Applies to a feature not available in PostgreSQL + + + + result_cast_char_set_catalog + sql_identifier + Applies to a feature not available in PostgreSQL + + + + result_cast_char_set_schema + sql_identifier + Applies to a feature not available in PostgreSQL + + + + result_cast_char_set_name + sql_identifier + Applies to a feature not available in PostgreSQL + + + + result_cast_collation_catalog + sql_identifier + Applies to a feature not available in PostgreSQL + + + + result_cast_collation_schema + sql_identifier + Applies to a feature not available in PostgreSQL + + + + result_cast_collation_name + sql_identifier + Applies to a feature not available in PostgreSQL + + + + result_cast_numeric_precision + cardinal_number + Applies to a feature not available in PostgreSQL + + + + result_cast_numeric_precision_radix + cardinal_number + Applies to a feature not available in PostgreSQL + + + + result_cast_numeric_scale + cardinal_number + Applies to a feature not available in PostgreSQL + + + + result_cast_datetime_precision + character_data + Applies to a feature not available in PostgreSQL + + + + result_cast_interval_type + character_data + Applies to a feature not available in PostgreSQL + + + + result_cast_interval_precision + character_data + Applies to a feature not available in PostgreSQL + + + + result_cast_type_udt_catalog + sql_identifier + Applies to a feature not available in PostgreSQL + + + + result_cast_type_udt_schema + sql_identifier + Applies to a feature not available in PostgreSQL + + + + result_cast_type_udt_name + sql_identifier Applies to a feature not available in PostgreSQL - security_type - character_data - - If the function runs with the privileges of the current user, - then INVOKER, if the function runs with the - privileges of the user who defined it, then - DEFINER. - + result_cast_scope_catalog + sql_identifier + Applies to a feature not available in PostgreSQL - to_sql_specific_catalog + result_cast_scope_schema sql_identifier Applies to a feature not available in PostgreSQL - to_sql_specific_schema + result_cast_scope_name sql_identifier Applies to a feature not available in PostgreSQL - to_sql_specific_name - sql_identifier + result_cast_maximum_cardinality + cardinal_number Applies to a feature not available in PostgreSQL - as_locator - character_data + result_cast_dtd_identifier + sql_identifier Applies to a feature not available in PostgreSQL @@ -3022,7 +3617,7 @@ ORDER BY c.ordinal_position; The view schemata contains all schemas in the - current database that are owned by the current user. + current database that are owned by a currently enabled role. @@ -3084,6 +3679,121 @@ ORDER BY c.ordinal_position;
+ + <literal>sequences</literal> + + + The view sequences contains all sequences + defined in the current database. Only those sequences are shown + that the current user has access to (by way of being the owner or + having some privilege). + + + + <literal>sequences</literal> Columns + + + + + Name + Data Type + Description + + + + + + sequence_catalog + sql_identifier + Name of the database that contains the sequence (always the current database) + + + + sequence_schema + sql_identifier + Name of the schema that contains the sequence + + + + sequence_name + sql_identifier + Name of the sequence + + + + data_type + character_data + + The data type of the sequence. In + PostgreSQL, this is currently always + bigint. + + + + + numeric_precision + cardinal_number + + This column contains the (declared or implicit) precision of + the sequence data type (see above). The precision indicates + the number of significant digits. It may be expressed in + decimal (base 10) or binary (base 2) terms, as specified in the + column numeric_precision_radix. + + + + + numeric_precision_radix + cardinal_number + + This column indicates in which base the values in the columns + numeric_precision and + numeric_scale are expressed. The value is + either 2 or 10. + + + + + numeric_scale + cardinal_number + + This column contains the (declared or implicit) scale of the + sequence data type (see above). The scale indicates the number + of significant digits to the right of the decimal point. It + may be expressed in decimal (base 10) or binary (base 2) terms, + as specified in the column + numeric_precision_radix. + + + + + maximum_value + cardinal_number + Not yet implemented + + + + minimum_value + cardinal_number + Not yet implemented + + + + increment + cardinal_number + Not yet implemented + + + + cycle_option + character_data + Not yet implemented + + + +
+
+ <literal>sql_features</literal> @@ -3379,6 +4089,69 @@ ORDER BY c.ordinal_position; + + <literal>sql_parts</literal> + + + The table sql_parts contains information about + which of the several parts of the SQL standard are supported by + PostgreSQL. + + + + <literal>sql_parts</literal> Columns + + + + + Name + Data Type + Description + + + + + + feature_id + character_data + An identifier string containing the number of the part + + + + feature_name + character_data + Descriptive name of the part + + + + is_supported + character_data + + YES if the part is fully supported by the + current version of PostgreSQL, + NO if not + + + + + is_verified_by + character_data + + Always null, since the PostgreSQL development group does not + perform formal testing of feature conformance + + + + + comments + character_data + Possibly a comment about the supported status of the part + + + +
+
+ <literal>sql_sizing</literal> @@ -3505,7 +4278,8 @@ ORDER BY c.ordinal_position; The view table_constraints contains all - constraints belonging to tables owned by the current user. + constraints belonging to tables that the current user owns or has + some privilege on. @@ -3588,10 +4362,9 @@ ORDER BY c.ordinal_position; The view table_privileges identifies all - privileges granted on tables or views to the current user or by the - current user. There is one row for each combination of table, - grantor, and grantee. Privileges granted to groups are identified - in the view role_table_grants. + privileges granted on tables or views to a currently enabled role + or by a currently enabled role. There is one row for each + combination of table, grantor, and grantee.
@@ -3610,13 +4383,13 @@ ORDER BY c.ordinal_position; grantor sql_identifier - Name of the user that granted the privilege + Name of the role that granted the privilege grantee sql_identifier - Name of the user or group that the privilege was granted to + Name of the role that the privilege was granted to @@ -3662,14 +4435,6 @@ ORDER BY c.ordinal_position;
- - - Note that the column grantee makes no - distinction between users and groups. If you have users and groups - with the same name, there is unfortunately no way to distinguish - them. A future version of PostgreSQL - will possibly prohibit having users and groups with the same name. -
@@ -3753,6 +4518,33 @@ ORDER BY c.ordinal_position; sql_identifier Applies to a feature not available in PostgreSQL + + + is_insertable_into + character_data + + YES if the table is insertable into, + NO if not (Base tables are always insertable + into, views not necessarily.) + + + + + is_typed + character_data + Applies to a feature not available in PostgreSQL + + + + commit_action + character_data + + If the table is a temporary table, then + PRESERVE, else null. (The SQL standard + defines other commit actions for temporary tables, which are + not supported by PostgreSQL.) + + @@ -3763,8 +4555,8 @@ ORDER BY c.ordinal_position; The view triggers contains all triggers defined - in the current database that are owned by the current user. (The - owner of the table is the owner of the trigger.) + in the current database on tables that the current user owns or has + some privilege on. @@ -3880,6 +4672,24 @@ ORDER BY c.ordinal_position; sql_identifierApplies to a feature not available in PostgreSQL + + + condition_reference_old_row + sql_identifier + Applies to a feature not available in PostgreSQL + + + + condition_reference_new_row + sql_identifier + Applies to a feature not available in PostgreSQL + + + + created + time_stamp + Applies to a feature not available in PostgreSQL +
@@ -3917,10 +4727,10 @@ ORDER BY c.ordinal_position; The view usage_privileges is meant to identify USAGE privileges granted on various kinds of - objects to the current user or by the current user. In - PostgreSQL, this currently only applies - to domains, and since domains do not have real privileges in - PostgreSQL, this view shows implicit + objects to a currently enabled role or by a currently enabled role. + In PostgreSQL, this currently only + applies to domains, and since domains do not have real privileges + in PostgreSQL, this view shows implicit USAGE privileges granted to PUBLIC for all domains. In the future, this view may contain more useful information. @@ -3998,8 +4808,8 @@ ORDER BY c.ordinal_position; The view view_column_usage identifies all columns that are used in the query expression of a view (the SELECT statement that defines the view). A - column is only included if the current user is the owner of the - table that contains the column. + column is only included if the table that contains the column is + owned by a currently enabled role. @@ -4077,6 +4887,73 @@ ORDER BY c.ordinal_position;
+ + <literal>view_routine_usage</literal> + + + The view view_routine_usage identifies all + routines (functions and procedures) that are used in the query + expression of a view (the SELECT statement that + defines the view). A routine is only included if that routine is + owned by a currently enabled role. + + + + <literal>view_routine_usage</literal> Columns + + + + + Name + Data Type + Description + + + + + + table_catalog + sql_identifier + Name of the database containing the view (always the current database) + + + + table_schema + sql_identifier + Name of the schema containing the view + + + + table_name + sql_identifier + Name of the view + + + + specific_catalog + sql_identifier + Name of the database containing the function (always the current database) + + + + specific_schema + sql_identifier + Name of the schema containing the function + + + + specific_name + sql_identifier + + The specific name of the function. See for more information. + + + + +
+
+ <literal>view_table_usage</literal> @@ -4084,8 +4961,8 @@ ORDER BY c.ordinal_position; The view view_table_usage identifies all tables that are used in the query expression of a view (the SELECT statement that defines the view). A - table is only included if the current user is the owner of that - table. + table is only included if that table is owned by a currently + enabled role. @@ -4199,8 +5076,8 @@ ORDER BY c.ordinal_position; view definition character_data - Query expression defining the view (null if the current user is - not the owner of the view) + Query expression defining the view (null if the view is not + owned by a currently enabled role) @@ -4213,13 +5090,20 @@ ORDER BY c.ordinal_position; is_updatable character_data - Not yet implemented + + YES if the view is updatable (allows + UPDATE and DELETE), + NO if not + is_insertable_into character_data - Not yet implemented + + YES if the view is insertable into (allows + INSERT), NO if not + -- cgit v1.2.3