MAC LABEL

Name

MAC LABEL -- change a mandate label applied to an object

Synopsis

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}'

Description

MAC LABEL applies a mandate label to a database object.

Parameters

object_name
aggregate_name
function_name
operator_class_name
operator_family_name
operator_name
trigger_name
rule_name

The name of the object which label is to be changed.

large_object_oid

OID 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.

argtype

The data type of a function or aggregate argument.

large_object_oid

The OID of the large object.

left_type
right_type

The arguments of cast object.

label

The new mandate maclabel, written as a string literal.

Examples

The following example shows how the mandate label of a database might be changed.

MAC LABEL ON DATABASE testdb IS '{0,1}';

Compatibility

There is no MAC LABEL command in the SQL standard.