Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-05-09 Thread Robert Haas
On Tue, May 9, 2017 at 11:24 PM, Thomas Munro wrote: > Since the last one conflicted with recent changes, here's a rebased > patch to prevent transition tables on views and foreign tables. Committed, but I made the new error details more like the existing one that

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-05-09 Thread Thomas Munro
Hi, Since the last one conflicted with recent changes, here's a rebased patch to prevent transition tables on views and foreign tables. -- Thomas Munro http://www.enterprisedb.com prevent-unsupported-transition-tables-v2.patch Description: Binary data -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-05-09 Thread Noah Misch
On Mon, May 08, 2017 at 12:00:20AM -0700, Noah Misch wrote: > On Sat, May 06, 2017 at 06:58:35PM +, Noah Misch wrote: > > On Tue, May 02, 2017 at 06:06:47PM -0500, Kevin Grittner wrote: > > > On Fri, Apr 28, 2017 at 10:56 PM, Tom Lane wrote: > > > > > > > They will fire

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-05-08 Thread Noah Misch
On Sat, May 06, 2017 at 06:58:35PM +, Noah Misch wrote: > On Tue, May 02, 2017 at 06:06:47PM -0500, Kevin Grittner wrote: > > On Fri, Apr 28, 2017 at 10:56 PM, Tom Lane wrote: > > > > > They will fire if you have an INSTEAD OF row-level trigger; the existence > > > of

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-05-06 Thread Noah Misch
On Tue, May 02, 2017 at 06:06:47PM -0500, Kevin Grittner wrote: > On Fri, Apr 28, 2017 at 10:56 PM, Tom Lane wrote: > > > They will fire if you have an INSTEAD OF row-level trigger; the existence > > of that trigger is what determines whether we implement DML on a view > >

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-05-02 Thread Kevin Grittner
On Fri, Apr 28, 2017 at 10:56 PM, Tom Lane wrote: > They will fire if you have an INSTEAD OF row-level trigger; the existence > of that trigger is what determines whether we implement DML on a view > through the view's own triggers or through translation to an action on > the

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-05-01 Thread Noah Misch
On Fri, Apr 28, 2017 at 05:07:31AM +, Noah Misch wrote: > On Wed, Apr 26, 2017 at 11:17:05AM +1200, Thomas Munro wrote: > > My colleague Prabhat Sahu reported off list that transition tables > > don't work for views. I probably should have thought about that when > > I fixed something similar

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-04-28 Thread Tom Lane
Kevin Grittner writes: > Well, I was sort of hoping that the triggers that can now be defined > but can never fire *did* fire at some point. They will fire if you have an INSTEAD OF row-level trigger; the existence of that trigger is what determines whether we implement DML on

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-04-28 Thread Kevin Grittner
On Fri, Apr 28, 2017 at 3:54 PM, Kevin Grittner wrote: > Not firing a table's DML because it was fired off a view would be crazy, should read: Not firing a table's trigger because the trigger is on DML run from a view's INSTEAD OF trigger would be crazy, -- Kevin Grittner

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-04-28 Thread Kevin Grittner
On Fri, Apr 28, 2017 at 2:42 PM, Tom Lane wrote: > Kevin Grittner writes: >> On Tue, Apr 25, 2017 at 6:17 PM, Thomas Munro >> wrote: >>> For views, aside from the question of transition tables, I noticed >>> that statement

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-04-28 Thread Tom Lane
Kevin Grittner writes: > On Tue, Apr 25, 2017 at 6:17 PM, Thomas Munro > wrote: >> For views, aside from the question of transition tables, I noticed >> that statement triggers don't seem to fire at all with updatable >> views. Surely they

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-04-28 Thread Kevin Grittner
On Tue, Apr 25, 2017 at 6:17 PM, Thomas Munro wrote: > My colleague Prabhat Sahu reported off list that transition tables > don't work for views. I probably should have thought about that when > I fixed something similar for partitioned tables, and after some >

Re: [HACKERS] Transition tables for triggers on foreign tables and views

2017-04-27 Thread Noah Misch
On Wed, Apr 26, 2017 at 11:17:05AM +1200, Thomas Munro wrote: > My colleague Prabhat Sahu reported off list that transition tables > don't work for views. I probably should have thought about that when > I fixed something similar for partitioned tables, and after some > experimentation I see that