From: | Greg Nancarrow <gregn4422(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: PublicationActions - use bit flags. |
Date: | 2021-12-21 00:19:16 |
Message-ID: | CAJcOf-d0T+9jy3ois4eytkX_NPpfWMiSA5a=23_5TXSiU26BEg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 21, 2021 at 4:14 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2021-Dec-20, Peter Eisentraut wrote:
>
> > I don't see why this is better. It just makes the code longer and adds more
> > punctuation and reduces type safety.
>
> Removing one palloc is I think the most important consequence ...
> probably not a big deal though.
>
> I think we could change the memcpy calls to struct assignment, as that
> would look a bit cleaner, and call it a day.
>
I think we can all agree that returning PublicationActions as a
palloc'd struct is unnecessary.
I've attached a patch which addresses that and replaces a couple of
memcpy()s with struct assignment, as suggested.
Regards,
Greg Nancarrow
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
get_rel_pubactions_improvement.patch | application/octet-stream | 4.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-12-21 00:43:43 | Re: Refactoring of compression options in pg_basebackup |
Previous Message | Tom Lane | 2021-12-20 23:17:49 | Re: sqlsmith: ERROR: XX000: bogus varno: 2 |