Re: "CREATE RULE ... ON SELECT": redundant?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: Ian Lawrence Barwick <barwick(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "CREATE RULE ... ON SELECT": redundant?
Date: 2023-05-04 12:17:52
Message-ID: 3196549.1683202672@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> And checking other versions, 9.6 is the same, it's only with pg 10 that
> it switches to creating a dummy view instead of a table (and using
> CREATE OR REPLACE VIEW, no mention of rules).

9.6.16 or later will use CREATE OR REPLACE VIEW, cf 404cbc562.

> So if the goal was to preserve compatibility with pre-pg10 dumps, that's
> already broken; if that's ok, then I don't see any obvious reason not to
> also remove or at least deprecate CREATE RULE ... ON SELECT for views.

Since the CREATE OR REPLACE case still works, I don't think removing
it is OK.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-05-04 12:18:13 Re: evtcache: EventTriggerCache vs Event Trigger Cache
Previous Message Tom Lane 2023-05-04 12:09:12 Re: evtcache: EventTriggerCache vs Event Trigger Cache