Re: Issues with Information_schema.views

Поиск
Список
Период
Сортировка
От jian he
Тема Re: Issues with Information_schema.views
Дата
Msg-id CACJufxHCp1phr1HSzaEnj_4HqK+Rw_PaK8a+-s3hi4vh3SSvmw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Issues with Information_schema.views  (Erki Eessaar <erki.eessaar@taltech.ee>)
Список pgsql-hackers
On Sun, Oct 29, 2023 at 4:05 PM Erki Eessaar <erki.eessaar@taltech.ee> wrote:
>
> Hello
>
> Thank you! I know that.
>
>
> Secondly, the rule you demonstrated does not alone change IS_UPDATABLE value to YES. I have to create two rules:
>
>  CREATE OR REPLACE RULE emps_update AS ON UPDATE
>     TO Emps
>     DO INSTEAD UPDATE emp SET
>         empno = NEW.empno,
>         ename = NEW.ename,
>         deptno = NEW.deptno;
>
>  CREATE OR REPLACE RULE emps_delete AS ON DELETE
>     TO Emps
>     DO INSTEAD DELETE FROM Emp WHERE empno=OLD.empno;
>
> My question is - is all of this the intended behaviour by the implementers?
>
> Best regards
> Erki Eessaar
>

per test, it's the expected behavior.
https://git.postgresql.org/cgit/postgresql.git/tree/src/test/regress/expected/updatable_views.out#n569
https://git.postgresql.org/cgit/postgresql.git/tree/src/test/regress/expected/updatable_views.out#n603
https://git.postgresql.org/cgit/postgresql.git/tree/src/test/regress/expected/updatable_views.out#n637

you need CREATE RULE  AS ON DELETE and CREATE RULE AS ON UPDATE to
mark the view as is_updatable.



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Use virtual tuple slot for Unique node
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: run pgindent on a regular basis / scripted manner