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

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: BUG #18178: New Restriction on "ON SELECT" rules on tables
Дата
Msg-id 8a0dd07e617563892e727a8119f9a34f86524eb1.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: BUG #18178: New Restriction on "ON SELECT" rules on tables  (Joshua Uyehara <joshua.uyehara@gmail.com>)
Ответы Re: BUG #18178: New Restriction on "ON SELECT" rules on tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Fri, 2023-11-03 at 00:44 -1000, Joshua Uyehara wrote:
> As far as the documentation error, on closer review, Part V, 41.2 ("Views and the Rules system")
> was updated to reflect the change, but the Reference entry for Create Rule in Part VI was not:
>
> > Presently, ON SELECT rules must be unconditional INSTEAD rules and must have actions that
> > consist of a single SELECT command. Thus, an ON SELECT rule effectively turns the table into
> > a view, whose visible contents are the rows returned by the rule's SELECT command rather than
> > whatever had been stored in the table (if anything). It is considered better style to write a
> > CREATE VIEW command than to create a real table and define an ON SELECT rule for it.

Yes, that paragraph has to go.

But I wonder if it would not be better to completely remove ON SELECT from the CREATE RULE
command.  Attached is a patch that does that.

The documentation part of this patch should be backpatched to v16, but the rest is
HEAD only.

Yours,
Laurenz Albe

Вложения

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

Предыдущее
От: Robert Leach
Дата:
Сообщение: Re: BUG #18177: certain queries under certain contexts take multiple orders of magnitude longer compared to v10
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #18178: New Restriction on "ON SELECT" rules on tables