postgresql/src/backend/rewrite
Tom Lane 4a41a069e7 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 Don't bother to attach column name lists to RowExprs of named types. 2022-03-17 18:25:44 -04:00
rewriteRemove.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
rewriteSearchCycle.c Fix incautious CTE matching in rewriteSearchAndCycle(). 2022-04-23 12:16:12 -04:00
rewriteSupport.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
rowsecurity.c Add support for MERGE SQL command 2022-03-28 16:47:48 +02:00