mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Add COMMENT and SECURITY LABEL support for publications and subscriptions
This commit is contained in:
@@ -424,6 +424,28 @@ FROM
|
||||
WHERE
|
||||
l.objsubid = 0
|
||||
UNION ALL
|
||||
SELECT
|
||||
l.objoid, l.classoid, l.objsubid,
|
||||
'publication'::text AS objtype,
|
||||
NULL::oid AS objnamespace,
|
||||
quote_ident(p.pubname) AS objname,
|
||||
l.provider, l.label
|
||||
FROM
|
||||
pg_seclabel l
|
||||
JOIN pg_publication p ON l.classoid = p.tableoid AND l.objoid = p.oid
|
||||
WHERE
|
||||
l.objsubid = 0
|
||||
UNION ALL
|
||||
SELECT
|
||||
l.objoid, l.classoid, 0::int4 AS objsubid,
|
||||
'subscription'::text AS objtype,
|
||||
NULL::oid AS objnamespace,
|
||||
quote_ident(s.subname) AS objname,
|
||||
l.provider, l.label
|
||||
FROM
|
||||
pg_shseclabel l
|
||||
JOIN pg_subscription s ON l.classoid = s.tableoid AND l.objoid = s.oid
|
||||
UNION ALL
|
||||
SELECT
|
||||
l.objoid, l.classoid, 0::int4 AS objsubid,
|
||||
'database'::text AS objtype,
|
||||
|
@@ -6340,9 +6340,11 @@ comment_type_name:
|
||||
| EXTENSION { $$ = OBJECT_EXTENSION; }
|
||||
| FOREIGN DATA_P WRAPPER { $$ = OBJECT_FDW; }
|
||||
| opt_procedural LANGUAGE { $$ = OBJECT_LANGUAGE; }
|
||||
| PUBLICATION { $$ = OBJECT_PUBLICATION; }
|
||||
| ROLE { $$ = OBJECT_ROLE; }
|
||||
| SCHEMA { $$ = OBJECT_SCHEMA; }
|
||||
| SERVER { $$ = OBJECT_FOREIGN_SERVER; }
|
||||
| SUBSCRIPTION { $$ = OBJECT_SUBSCRIPTION; }
|
||||
| TABLESPACE { $$ = OBJECT_TABLESPACE; }
|
||||
;
|
||||
|
||||
@@ -6453,8 +6455,10 @@ security_label_type_name:
|
||||
DATABASE { $$ = OBJECT_DATABASE; }
|
||||
| EVENT TRIGGER { $$ = OBJECT_EVENT_TRIGGER; }
|
||||
| opt_procedural LANGUAGE { $$ = OBJECT_LANGUAGE; }
|
||||
| PUBLICATION { $$ = OBJECT_PUBLICATION; }
|
||||
| ROLE { $$ = OBJECT_ROLE; }
|
||||
| SCHEMA { $$ = OBJECT_SCHEMA; }
|
||||
| SUBSCRIPTION { $$ = OBJECT_SUBSCRIPTION; }
|
||||
| TABLESPACE { $$ = OBJECT_TABLESPACE; }
|
||||
;
|
||||
|
||||
|
Reference in New Issue
Block a user