typedef struct LogicalDecodingContext

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: typedef struct LogicalDecodingContext
Date: 2023-03-01 22:13:58
Message-ID: CAHut+PtfFphZxBYBA8fa7Sq8wAMRCqGBuaR9gCdfCNbPR7E2gA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

During a recent code review, I noticed a lot of 'struct
LogicalDecodingContext' usage.

There are many function prototypes where the params are (for no
apparent reason to me) a mixture of structs and typedef structs.

AFAICT just by pre-declaring the typedef struct
LogicalDecodingContext, all of those 'struct LogicalDecodingContext'
can be culled, resulting in cleaner and more consistent function
signatures.

The PG Docs were similarly modified.

PSA patch for this. It passes make check-world.

(I recognize this is potentially the tip of an iceberg. If this patch
is deemed OK, I can hunt down similar underuse of typedefs for other
structs)

Thoughts?

------
Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment Content-Type Size
v1-0001-Use-typedef-struct-LogicalDecodingContext.patch application/octet-stream 27.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joseph Koshakow 2023-03-01 22:21:03 Re: Infinite Interval
Previous Message Heikki Linnakangas 2023-03-01 22:04:14 Re: refactoring relation extension and BufferAlloc(), faster COPY