public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Greg Nancarrow <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: PublicationActions - use bit flags.
Date: Tue, 25 Jan 2022 11:54:29 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJcOf-eb1wvGCVzMBQH++ubQ3TDwwmqva0uy5w20Y2KUpWkN=A@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CAJcOf-d0T+9jy3ois4eytkX_NPpfWMiSA5a=23_5TXSiU26BEg@mail.gmail.com>
<[email protected]>
<CAJcOf-cXspVxTe7pe6QGyCOq6tmftgrxXZ_yRe53mx8L9wqXPw@mail.gmail.com>
<CAJcOf-d0=vQx1Pzbf+LVarywejJFS5W+M6uR+2d0oeEJ2VQ+Ew@mail.gmail.com>
<[email protected]>
<CAJcOf-eb1wvGCVzMBQH++ubQ3TDwwmqva0uy5w20Y2KUpWkN=A@mail.gmail.com>
On 25.01.22 07:14, Greg Nancarrow wrote:
>
> On Tue, Jan 25, 2022 at 7:31 AM Peter Eisentraut
> <[email protected]
> <mailto:[email protected]>> wrote:
> >
> > Why can't GetRelationPublicationActions() have the PublicationActions as
> > a return value, instead of changing it to an output argument?
>
> That would be OK too, for now, for the current (small size, typically
> 4-byte) PublicationActions struct.
> But if that function was extended in the future to return more
> publication information than just the PublicationActions struct (and I'm
> seeing that in the filtering patches [1]), then using return-by-value
> won't be as efficient as pass-by-reference, and I'd tend to stick with
> pass-by-reference in that case.
>
> [1]
> https://postgr.es/m/OS0PR01MB5716B899A66D2997EF28A1B3945F9%40OS0PR01MB5716.jpnprd01.prod.outlook.com
> <https://postgr.es/m/OS0PR01MB5716B899A66D2997EF28A1B3945F9%40OS0PR01MB5716.jpnprd01.prod.outlook.com;
By itself, this refactoring doesn't seem worth it. The code is actually
longer at the end, and we haven't made it any more extensible or
anything. And AFAICT, this is not called in a performance-sensitive way.
The proposed changes in [1] change this function more significantly, so
adopting the present change wouldn't really help there either except
create the need for one more rebase.
So I think we should leave this alone here and let [1] make the changes
it needs.
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: PublicationActions - use bit flags.
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox