From 463f2625a5fb183b6a8925ccde98bb3889f921d9 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 20 Jul 2011 13:18:24 -0400 Subject: Support SECURITY LABEL on databases, tablespaces, and roles. This requires a new shared catalog, pg_shseclabel. Along the way, fix the security_label regression tests so that they don't monkey with the labels of any pre-existing objects. This is unlikely to matter in practice, since only the label for the "dummy" provider was being manipulated. But this way still seems cleaner. KaiGai Kohei, with fairly extensive hacking by me. --- doc/src/sgml/catalogs.sgml | 78 ++++++++++++++++++++++++++++++++++++ doc/src/sgml/ref/security_label.sgml | 3 ++ 2 files changed, 81 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index a5ae7c9e91c..5e5f8a75547 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -238,6 +238,11 @@ comments on shared objects + + pg_shseclabel + security labels on shared database objects + + pg_statistic planner statistics @@ -4681,6 +4686,12 @@ way to view security labels, see . + + See also pg_shseclabel, + which performs a similar function for security labels of database objects + that are shared across a database cluster. + + <structname>pg_seclabel</structname> Columns @@ -4959,6 +4970,73 @@ + + <structname>pg_shseclabel</structname> + + + pg_shseclabel + + + + The catalog pg_shseclabel stores security + lables on shared database objects. Security labels can be manipulated + with the command. For an easier + way to view security labels, see . + + + + See also pg_seclabel, + which performs a similar function for security labels involving objects + within a single database. + + + + Unlike most system catalogs, pg_shseclabel + is shared across all databases of a cluster: there is only one + copy of pg_shseclabel per cluster, not + one per database. + + +
+ <structname>pg_shseclabel</structname> Columns + + + + Name + Type + References + Description + + + + + objoid + oid + any OID column + The OID of the object this security label pertains to + + + classoid + oid + pg_class.oid + The OID of the system catalog this object appears in + + + provider + name + + The label provider associated with this label. + + + label + text + + The security label applied to this object. + + + +
+ <structname>pg_statistic</structname> diff --git a/doc/src/sgml/ref/security_label.sgml b/doc/src/sgml/ref/security_label.sgml index 13b62e22aa1..a9eda21b72a 100644 --- a/doc/src/sgml/ref/security_label.sgml +++ b/doc/src/sgml/ref/security_label.sgml @@ -26,13 +26,16 @@ SECURITY LABEL [ FOR provider ] ON TABLE object_name | COLUMN table_name.column_name | AGGREGATE agg_name (agg_type [, ...] ) | + DATABASE object_name | DOMAIN object_name | FOREIGN TABLE object_name FUNCTION function_name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) | LARGE OBJECT large_object_oid | [ PROCEDURAL ] LANGUAGE object_name | + ROLE object_name | SCHEMA object_name | SEQUENCE object_name | + TABLESPACE object_name | TYPE object_name | VIEW object_name } IS 'label' -- cgit v1.2.3