diff options
author | Joe Conway | 2017-04-09 21:01:58 +0000 |
---|---|---|
committer | Joe Conway | 2017-04-09 21:01:58 +0000 |
commit | 25542d77dd549940468d1a932809feb9959d717d (patch) | |
tree | 40170811f8ae439881fb99e90b12076aacf1b4c4 /contrib/sepgsql/dml.c | |
parent | eef8c0069e4d5eea2e52965ce3eb018b5a594fd6 (diff) |
Add partitioned table support to sepgsql
The new partitioned table capability added a new relkind, namely
RELKIND_PARTITIONED_TABLE. Update sepgsql to treat this new relkind
exactly the same way it does RELKIND_RELATION.
In addition, add regression test coverage for partitioned tables.
Issue raised by Stephen Frost and initial patch by Mike Palmiotto.
Review by Tom Lane and Robert Haas, and editorializing by me.
Discussion: https://postgr.es/m/flat/623bcaae-112e-ced0-8c22-a84f75ae0c53%40joeconway.com
Diffstat (limited to 'contrib/sepgsql/dml.c')
-rw-r--r-- | contrib/sepgsql/dml.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/sepgsql/dml.c b/contrib/sepgsql/dml.c index bc170895f0..b643720e36 100644 --- a/contrib/sepgsql/dml.c +++ b/contrib/sepgsql/dml.c @@ -190,6 +190,7 @@ check_relation_privileges(Oid relOid, switch (relkind) { case RELKIND_RELATION: + case RELKIND_PARTITIONED_TABLE: result = sepgsql_avc_check_perms(&object, SEPG_CLASS_DB_TABLE, required, @@ -225,7 +226,7 @@ check_relation_privileges(Oid relOid, /* * Only columns owned by relations shall be checked */ - if (relkind != RELKIND_RELATION) + if (relkind != RELKIND_RELATION && relkind != RELKIND_PARTITIONED_TABLE) return true; /* |