BUG #18178: New Restriction on "ON SELECT" rules on tables
The Post Office <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: joshua.uyehara@gmail.com
Date: 2023-11-01T23:25:48Z
Lists: 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
Commits
-
Doc: update CREATE RULE ref page's hoary discussion of views.
- f53f83b33e42 14.10 landed
- 9d4ea0bb3fd4 16.1 landed
- 95a610b0970d 17.0 landed
- 58d3283b6756 15.5 landed
- 3f9fe9b76f90 11.22 landed
- 1f7d7f102d14 12.17 landed
- 111364ec20e1 13.13 landed
-
Remove logic for converting a table to a view.
- b23cd185fd54 16.0 cited