Re: Event trigger code comment duplication

2020-05-14 Thread David G. Johnston
On Thu, May 14, 2020 at 4:25 PM Michael Paquier wrote: > On Wed, May 13, 2020 at 04:48:59PM +0900, Michael Paquier wrote: > > Still not sure that's worth bothering. So, let's wait a couple of > > days first to see if anybody has any comments, though I'd like to just > > go with the simplest solu

Re: Event trigger code comment duplication

2020-05-14 Thread Michael Paquier
On Wed, May 13, 2020 at 04:48:59PM +0900, Michael Paquier wrote: > Still not sure that's worth bothering. So, let's wait a couple of > days first to see if anybody has any comments, though I'd like to just > go with the simplest solution at hand and remove only the duplicated > comment about the s

Re: Event trigger code comment duplication

2020-05-13 Thread Michael Paquier
On Tue, May 12, 2020 at 10:26:46PM -0700, David G. Johnston wrote: > On Tuesday, May 12, 2020, Michael Paquier wrote: >> Even with all that, I am not sure that we need to complicate further >> what we have here. An empty currentEventTriggerState gets checks in >> three places, and each one of the

Re: Event trigger code comment duplication

2020-05-12 Thread David G. Johnston
On Tuesday, May 12, 2020, Michael Paquier wrote: > On Tue, May 12, 2020 at 06:48:51PM -0700, David G. Johnston wrote: > > Whether its a style thing, or some requirement of the C-language, I found > > it odd that the four nearly identical checks were left inline in the > > functions instead of bei

Re: Event trigger code comment duplication

2020-05-12 Thread Michael Paquier
On Tue, May 12, 2020 at 06:48:51PM -0700, David G. Johnston wrote: > Whether its a style thing, or some requirement of the C-language, I found > it odd that the four nearly identical checks were left inline in the > functions instead of being pulled out into a function. I've attached a > conceptua

Re: Event trigger code comment duplication

2020-05-12 Thread David G. Johnston
On Mon, May 11, 2020 at 11:30 PM Michael Paquier wrote: > The second point about the check with (!currentEventTriggerState) in > EventTriggerTableRewrite() and EventTriggerDDLCommandEnd() shows that > both comments share the same first sentence, but there is enough > different context to just kee

Re: Event trigger code comment duplication

2020-05-11 Thread Michael Paquier
On Mon, May 11, 2020 at 05:13:38PM -0700, David G. Johnston wrote: > Skimming through the code in event_trigger.c and noticed that while most of > the stanzas that reference IsUnderPostmaster refer back to the code comment > beginning on line 675 the block for table rewrite copied it in > verbatim