Reject non-ON-SELECT rules that are named "_RETURN". DefineQueryRewrite() has long required that ON SELECT rules be named "_RETURN". But we overlooked the converse case: we should forbid non-ON-SELECT rules that are named "_RETURN". In particular this prevents using CREATE OR REPLACE RULE to overwrite a view's _RETURN rule with some other kind of rule, thereby breaking the view.
Per bug #17646 from Kui Liu. Back-patch to all supported branches. Discussion: https://postgr.es/m/[email protected] Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ecf4ce689a7c3d91b912f3f41d8502f322592619 Modified Files -------------- src/backend/rewrite/rewriteDefine.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
