PG10 Partitioned tables and relation_is_updatable()
Dean Rasheed <dean.a.rasheed@gmail.com>
From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2017-06-11T11:32:48Z
Lists: pgsql-hackers
Attachments
- teach-relation-is-updatable-about-partitioned-tables.patch (application/octet-stream) patch
Hi, It looks like relation_is_updatable() didn't get the message about partitioned tables. Thus, for example, information_schema.views and information_schema.columns report that simple views built on top of partitioned tables are non-updatable, which is wrong. Attached is a patch to fix this. I think this kind of omission is an easy mistake to make when adding a new relkind, so it might be worth having more pairs of eyes looking out for more of the same. I did a quick scan of the rewriter code (prompted by the recent similar omission for RLS on partitioned tables) and I didn't find any more problems there, but I haven't looked elsewhere yet. Regards, Dean
Commits
-
Teach PL/pgSQL about partitioned tables.
- d3c3f2b1e25c 10.0 landed
-
Teach RemoveRoleFromObjectPolicy() about partitioned tables.
- f356ec57444e 10.0 landed
-
Teach relation_is_updatable() about partitioned tables.
- b6263cd851ef 10.0 landed