OSDN Git Service

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)
commita7107136445914dcfaee7fed4cf65314f73cc6b7
tree33582852d7c67b7bb7eb957078a67773928e938a
parent19586031452aff2f44bf2d532058faf9d21d584f
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