MAC LABEL — change a mandate label applied to an object
MAC LABEL ON
{
DATABASE {CURRENT_CATALOG | object_name} |
DOMAIN object_name |
EVENT TRIGGER object_name |
INDEX object_name |
SEQUENCE object_name |
TABLE object_name |
FOREIGN TABLE object_name |
FOREIGN DATA WRAPPER object_name |
SERVER object_name |
TYPE object_name |
VIEW object_name |
COLLATION object_name |
CONVERSION object_name |
LANGUAGE object_name |
MATERIALIZED VIEW object_name |
LARGE OBJECT large_object_oid |
CLUSTER |
SCHEMA object_name |
TABLESPACE object_name |
EXTENSION object_name |
ROLE object_name |
TEXT SEARCH PARSER object_name |
TEXT SEARCH DICTIONARY object_name |
TEXT SEARCH TEMPLATE object_name |
TEXT SEARCH CONFIGURATION object_name |
AGGREGATE aggregate_name ( aggregate_signature ) |
FUNCTION function_name ( [ argname ] argtype [, ...] ] ) |
CAST (left_type AS right_type)
OPERATOR CLASS operator_class_name USING access_method_type|
OPERATOR FAMILY operator_family_name USING access_method_type|
OPERATOR operator_name ( [ argname ] argtype [, ...] ] ) |
TRIGGER trigger_name ON table_name
RULE rule_name ON table_name
} IS 'label'
where aggregate_signature is:
* |
[ argmode ] [ argname ] argtype [ , ... ] |
[ [ argmode ] [ argname ] argtype [ , ... ] ] ORDER BY [ argmode ] [ argname ] argtype [ , ... ]
where label is:
'{level,category}'
MAC LABEL applies a mandate label to a database
object.
object_nameaggregate_namefunction_nameoperator_class_nameoperator_family_nameoperator_nametrigger_namerule_nameThe name of the object which label is to be changed.
large_object_oidOID of large object which this label is to be associated.
argmode
The mode of a function or aggregate
argument: IN, OUT,
INOUT, or VARIADIC.
If omitted, the default is IN.
Note that MAC LABEL does not actually
pay any attention to OUT arguments, since only the input
arguments are needed to determine the function's identity.
So it is sufficient to list the IN, INOUT,
and VARIADIC arguments.
argname
The name of a function or aggregate argument.
Note that MAC LABEL does not actually
pay any attention to argument names, since only the argument data
types are needed to determine the function's identity.
argtypeThe data type of a function or aggregate argument.
large_object_oidThe OID of the large object.
left_typeright_typeThe arguments of cast object.
labelThe new mandate maclabel, written as a string literal.
The following example shows how the mandate label of a database might be changed.
MAC LABEL ON DATABASE testdb IS '{0,1}';
There is no MAC LABEL command in the SQL standard.