Re: Adding a LogicalRepWorker type field - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Adding a LogicalRepWorker type field
Date
Msg-id CAExHW5uALiimrdpdO0vwuDivD99TW+_9vvfFsErVNzq1ehYV9Q@mail.gmail.com
Whole thread Raw
In response to Re: Adding a LogicalRepWorker type field  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: Adding a LogicalRepWorker type field
List pgsql-hackers


On Wed, Aug 2, 2023 at 12:14 PM Peter Smith <smithpb2250@gmail.com> wrote:

We can't use the same names for both with/without-parameter functions
because there is no function overloading in C. In patch v3-0001 I've
replaced the "dual set of macros", with a single inline function of a
different name, and one set of space-saving macros.

I think it's a good idea to add worker type field. Trying to deduce it based on the contents of the structure isn't good. RelOptInfo, for example, has RelOptKind. But RelOptInfo has become really large with members required by all RelOptKinds crammed under the same structure. If we can avoid that here at the beginning itself, that will be great. May be we should create a union of type specific members while we are introducing the type. This will also provide some protection against unrelated members being (mis)used in the future.

--
Best Wishes,
Ashutosh Bapat

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: generic plans and "initial" pruning
Next
From: Etsuro Fujita
Date:
Subject: Re: Missing comments/docs about custom scan path