Re: Issues with Information_schema.views

2023-10-29 Thread Tom Lane
Erki Eessaar writes: > My question is - is all of this the intended behaviour by the implementers? Yes, I'd say so. If you are expecting that the is_updatable flag will check to see if the behavior provided by the view's rules corresponds to something that a human would call a corresponding upda

Re: Issues with Information_schema.views

2023-10-29 Thread jian he
On Sun, Oct 29, 2023 at 4:05 PM Erki Eessaar 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 UP

Re: Issues with Information_schema.views

2023-10-29 Thread Erki Eessaar
Eessaar From: jian he Sent: Saturday, October 28, 2023 13:38 To: Erki Eessaar Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Issues with Information_schema.views On Sat, Oct 28, 2023 at 5:27 PM Erki Eessaar wrote: > > Hello > > > /*After that: i

Re: Issues with Information_schema.views

2023-10-28 Thread jian he
On Sat, Oct 28, 2023 at 5:27 PM Erki Eessaar wrote: > > Hello > > > /*After that: is_updatable=YES*/ > > 1. Indeed, now I can execute INSERT/UPDATE/DELETE against the view without > getting an error. However, I still cannot change the data in the database > through the views. https://www.postgr