Add checks to DefineQueryRewrite() to prohibit attaching rules to relations
commitfb6d06584fe063ff68a19c8534368dc21c69541b
authortgl <tgl>
Wed, 13 May 2009 22:32:55 +0000 (13 22:32 +0000)
committertgl <tgl>
Wed, 13 May 2009 22:32:55 +0000 (13 22:32 +0000)
tree2643d18cfc97e1b040cdc8ab6dabfe43ffd06ab9
parentc2df004a1986c887abdd515442568e613ce0c51c
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