Re: BUG #18178: New Restriction on "ON SELECT" rules on tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #18178: New Restriction on "ON SELECT" rules on tables
Дата
Msg-id 3027424.1698934802@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #18178: New Restriction on "ON SELECT" rules on tables  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #18178: New Restriction on "ON SELECT" rules on tables  (Joshua Uyehara <joshua.uyehara@gmail.com>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> 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.

If the documentation still says that, it needs to be updated.
What are you looking at precisely?

> 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.

TBH, I don't believe that argument for a second.  Pre-v16, what
happened when you added an ON SELECT rule to a table is that *the
table got changed into a view* (which is what caused the bugs
mentioned in the thread Daniel pointed you to).  There is no
difference between the subsequent catalog state and what you would
have if you'd just created it as a view in the first place.  So
do that and then add whatever non-SELECT rules you need, and you
should be in the same place as before (and your code will still
work with pre-v16 releases, too).

            regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Logical replication is missing block of rows when sending initial sync?
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18180: Maybe a bug? repomd.xml signature could not be verified for pgdg-common