[PATCH] Reorganize pqcomm.h a bit

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Nathan Bossart <nathandbossart(at)gmail(dot)com>
Subject: [PATCH] Reorganize pqcomm.h a bit
Date: 2025-11-21 19:10:12
Message-ID: CAOYmi+=6zg4oXXOQtifrVao_YKiujTDa3u6bxnU08r0FsSig4g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I was reviewing a patchset by Jelte [1] and decided that pqcomm.h has
gotten hard to read/organize.

Attached is a patch that groups the magic PG_PROTOCOL() codes, adds a
comment to a typedef that was orphaned when protocol.h arrived, and
tweaks some whitespace to make the "paragraphs" easier to scan (IMHO).
I did have some misgivings about separating CANCEL_REQUEST_CODE from
its packet struct, but I think it's a net improvement.

WDYT?

--Jacob

[1] https://postgr.es/m/DDPR5BPWH1RJ.1LWAK6QAURVAY@jeltef.nl

Attachment Content-Type Size
0001-Reorganize-pqcomm.h-a-bit.patch application/octet-stream 4.4 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Nico Williams 2025-11-21 19:17:52 Re: RFC 9266: Channel Bindings for TLS 1.3 support
Previous Message Tom Lane 2025-11-21 18:52:07 Re: Optimize cardinality estimation when unique keys are fully covered