On 11 June 2017 at 16:59, Joe Conway <m...@joeconway.com> wrote: > On 06/11/2017 08:55 AM, Joe Conway wrote: >> Yeah, I noticed the same while working on the RLS related patch. I did >> not see anything else in rewriteHandler.c but it is probably worth >> looking wider for other omissions. > > So in particular: > > #define RelationIsUsedAsCatalogTable(relation) \ > ((relation)->rd_options && \ > ((relation)->rd_rel->relkind == RELKIND_RELATION || \ > (relation)->rd_rel->relkind == RELKIND_MATVIEW) ? \ > ((StdRdOptions *) (relation)->rd_options)->user_catalog_table : false) > 8<---------------------------- > > Does RELKIND_PARTITIONED_TABLE apply there? >
Hmm, a quick experiment shows that it won't allow a partitioned table to be used as a user catalog table, although I'm not sure if that's intentional. If it is, it doesn't appear to be documented. I found another RLS-related omission -- RemoveRoleFromObjectPolicy() doesn't work for partitioned tables, so DROP OWNED BY <role> will fail if there are any partitioned tables with RLS. I also found another couple of omissions in PL/pgSQL -- plpgsql_parse_cwordtype() and build_row_from_class(), so for example %rowtype doesn't work for partitioned tables. That's it for my quick once-over the code-base, but I'm not confident that will have caught everything. Regards, Dean -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers