BUG #18178: New Restriction on "ON SELECT" rules on tables - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18178: New Restriction on "ON SELECT" rules on tables
Date
Msg-id 18178-05534d7064044d2d@postgresql.org
Whole thread Raw
Responses Re: BUG #18178: New Restriction on "ON SELECT" rules on tables  (Daniel Gustafsson <daniel@yesql.se>)
Re: BUG #18178: New Restriction on "ON SELECT" rules on tables  (Laurenz Albe <laurenz.albe@cybertec.at>)
Re: BUG #18178: New Restriction on "ON SELECT" rules on tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18178
Logged by:          Joshua Uyehara
Email address:      joshua.uyehara@gmail.com
PostgreSQL version: 16.0
Operating system:   Windows Server 2022
Description:

Hello,

Apologies if this is not the right place to report this, but it is either a
'bug' in the documentation, or (I'm hoping) a breaking change that could be
reverted.

The documentation for rules specifically states that "ON SELECT" rules can
be created on tables (and I have functionality/use cases that rely on that)
behavior, but pg16 breaks that.

In investigating the issue I did find what is likely the related release
note for 16 "Remove the ability to create views manually with ON SELECT
rules (Tom Lane)", but couldn't find any related discussion of the
rationale, suggested workarounds, or whether anyone else has yet run into
the same class of issues (possible given the recency of the release).

The issue is, basically, that there are broad classes of database
abstraction middleware that are configured via database introspection at
runtime and do not understand or implement the concept of updateable views
and foreign tables.  The easiest workaround for that limitation in postgres
has always been to create a local table stand-in with all operations
rerouted to the foreign table via rules.

If I need to report this somewhere else, or send to one of the mailing
lists, please let me know.

Regards,
Josh


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18177: certain queries under certain contexts take multiple orders of magnitude longer compared to v10
Next
From: Bruce Momjian
Date:
Subject: Re: Wrong result for comparing ROW(...) with IS NOT NULL