| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Reject non-ON-SELECT rules that are named "_RETURN". |
| Date: | 2022-10-17 16:14:54 |
| Message-ID: | E1okSlS-002myJ-3e@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/797e313dc9aed83e28e9f1d08a281ea48c560cd2
Modified Files
--------------
src/backend/rewrite/rewriteDefine.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2022-10-17 18:02:13 | pgsql: Record dependencies of a cast on other casts that it requires. |
| Previous Message | Tom Lane | 2022-10-17 15:35:40 | pgsql: Guard against table-AM-less relations in planner. |