On Thu, Jan 6, 2022, at 1:18 AM, Amit Kapila wrote: > On Thu, Jan 6, 2022 at 8:43 AM Peter Smith <smithpb2...@gmail.com> wrote: > > > > On Wed, Jan 5, 2022 at 9:52 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > > > > ... > > > > > Another minor comment: > > > +static bool pgoutput_row_filter(enum ReorderBufferChangeType changetype, > > > > > > Do we need to specify the 'enum' type before changetype parameter? > > > > > > > That is because there is currently no typedef for the enum > > ReorderBufferChangeType. > > > > But I see that the 0002 patch is already adding the required typedef. IMO we shouldn't reuse ReorderBufferChangeType. For a long-term solution, it is fragile. ReorderBufferChangeType has values that do not matter for row filter and it relies on the fact that REORDER_BUFFER_CHANGE_INSERT, REORDER_BUFFER_CHANGE_UPDATE and REORDER_BUFFER_CHANGE_DELETE are the first 3 values from the enum, otherwise, it breaks rfnodes and no_filters in pgoutput_row_filter(). I suggest a separate enum that contains only these 3 values.
enum RowFilterPublishAction { PUBLISH_ACTION_INSERT, PUBLISH_ACTION_UPDATE, PUBLISH_ACTION_DELETE }; -- Euler Taveira EDB https://www.enterprisedb.com/