Re: insert on conflict on updatable views

2018-08-01 Thread Amit Langote
On 2018/08/02 11:24, Peter Geoghegan wrote: > On Wed, Aug 1, 2018 at 7:15 PM, Amit Langote > wrote: >> create table foo (a int unique, b text); >> create view foo_view as select b, a+1 as c, a from foo; >> >> explain insert into foo_view (a, b) select 1, 2 on conflict (a) do update >> set b = excl

Re: insert on conflict on updatable views

2018-08-01 Thread Peter Geoghegan
On Wed, Aug 1, 2018 at 7:15 PM, Amit Langote wrote: > create table foo (a int unique, b text); > create view foo_view as select b, a+1 as c, a from foo; > > explain insert into foo_view (a, b) select 1, 2 on conflict (a) do update > set b = excluded.b where excluded.c > 0; > IOW, the EXCLUDED pse