postgresql/src/backend/rewrite
Tom Lane 2f26cec488 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/17646-70c93cfa40365776@postgresql.org
2022-10-17 12:14:39 -04:00
..
Makefile SEARCH and CYCLE clauses 2021-02-01 14:32:51 +01:00
rewriteDefine.c Reject non-ON-SELECT rules that are named "_RETURN". 2022-10-17 12:14:39 -04:00
rewriteHandler.c Yet further fixes for multi-row VALUES lists for updatable views. 2022-10-11 18:24:14 -04:00
rewriteManip.c
rewriteRemove.c
rewriteSearchCycle.c Fix incautious CTE matching in rewriteSearchAndCycle(). 2022-04-23 12:16:12 -04:00
rewriteSupport.c
rowsecurity.c doc: Improve hyphenation consistency 2021-04-21 08:14:43 +02:00