mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
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.
This commit is contained in:
@ -5068,11 +5068,14 @@ opt_provider: FOR ColId_or_Sconst { $$ = $2; }
|
||||
|
||||
security_label_type:
|
||||
COLUMN { $$ = OBJECT_COLUMN; }
|
||||
| DATABASE { $$ = OBJECT_DATABASE; }
|
||||
| FOREIGN TABLE { $$ = OBJECT_FOREIGN_TABLE; }
|
||||
| SCHEMA { $$ = OBJECT_SCHEMA; }
|
||||
| SEQUENCE { $$ = OBJECT_SEQUENCE; }
|
||||
| TABLE { $$ = OBJECT_TABLE; }
|
||||
| DOMAIN_P { $$ = OBJECT_TYPE; }
|
||||
| ROLE { $$ = OBJECT_ROLE; }
|
||||
| TABLESPACE { $$ = OBJECT_TABLESPACE; }
|
||||
| TYPE_P { $$ = OBJECT_TYPE; }
|
||||
| VIEW { $$ = OBJECT_VIEW; }
|
||||
;
|
||||
|
Reference in New Issue
Block a user