Add checks to DefineQueryRewrite() to prohibit attaching rules to relations
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 13 May 2009 22:32:55 +0000 (22:32 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 13 May 2009 22:32:55 +0000 (22:32 +0000)
commit100982fdc9926f8b2748520a549849f6c88563fd
treea4e685f4c0f557b2661958697ba34ac4cbc5559e
parenta85d06ec1899ef8c618107a93b371eaa04f7f9d4
Add checks to DefineQueryRewrite() to prohibit attaching rules to relations
that aren't RELKIND_RELATION or RELKIND_VIEW, and to disallow attaching rules
to system relations unless allowSystemTableMods is on.  This is to make the
behavior of CREATE RULE more like CREATE TRIGGER, which disallows the
comparable cases.  Per discussion of bug #4808.
src/backend/rewrite/rewriteDefine.c