Re: some ri_triggers.c cleanup

2019-02-28 Thread Peter Eisentraut
On 2019-02-25 17:17, Corey Huinker wrote: > Right, this makes a lot of sense, similar to how ri_restrict() combines > RESTRICT and NO ACTION. > > > I'm pretty sure that's where I got the idea, yes.  Committed, including your patch. -- Peter Eisentraut

Re: some ri_triggers.c cleanup

2019-02-25 Thread Corey Huinker
> > Right, this makes a lot of sense, similar to how ri_restrict() combines > RESTRICT and NO ACTION. > I'm pretty sure that's where I got the idea, yes.

Re: some ri_triggers.c cleanup

2019-02-25 Thread Peter Eisentraut
On 2019-02-24 00:34, Corey Huinker wrote: > As I suspected, the code for SET NULL and SET DEFAULT are highly similar > (see .diff), the major difference being two constants, the order of some > variable declarations, and the recheck in the set-default case. > > The changes were so simple that I

Re: some ri_triggers.c cleanup

2019-02-23 Thread Corey Huinker
On Fri, Feb 22, 2019 at 1:12 PM Corey Huinker wrote: > On Fri, Feb 22, 2019 at 11:05 AM Peter Eisentraut < > peter.eisentr...@2ndquadrant.com> wrote: > >> ri_triggers.c is endlessly long and repetitive. I want to clean it up a >> bit (more). >> > > Having just been down this road, I agree that

Re: some ri_triggers.c cleanup

2019-02-22 Thread Corey Huinker
On Fri, Feb 22, 2019 at 11:05 AM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > ri_triggers.c is endlessly long and repetitive. I want to clean it up a > bit (more). > Having just been down this road, I agree that a lot of cleanup is needed and possible. > I looked into all

some ri_triggers.c cleanup

2019-02-22 Thread Peter Eisentraut
ri_triggers.c is endlessly long and repetitive. I want to clean it up a bit (more). I looked into all these switch cases for the unimplemented MATCH PARTIAL option. I toyed around with how a MATCH PARTIAL implementation would actually look like, and it likely wouldn't use the existing code