[PATCH] Reserve protocol 3.1 explicitly in pqcomm.h

Started by Jacob Champion3 months ago5 messageshackers
Jump to latest
#1Jacob Champion
jacob.champion@enterprisedb.com

Hi,

This is a tiny followup to https://postgr.es/c/0664aa4ff8 that
enshrines the unused 3.1 protocol version as PG_PROTOCOL_RSRV31. The
patch comes from [1]/messages/by-id/CAOYmi+=PMq5wiKjBuOF2_W6JYRnPFYbgp7P-MRa2ymFo89=6BQ@mail.gmail.com; I just wanted to give people the opportunity to
bikeshed the name (or object to the move?) before it becomes part of a
public header.

Thanks,
--Jacob

[1]: /messages/by-id/CAOYmi+=PMq5wiKjBuOF2_W6JYRnPFYbgp7P-MRa2ymFo89=6BQ@mail.gmail.com

Attachments:

0001-pqcomm.h-Explicitly-reserve-protocol-v3.1.patchapplication/octet-stream; name=0001-pqcomm.h-Explicitly-reserve-protocol-v3.1.patchDownload+7-2
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jacob Champion (#1)
Re: [PATCH] Reserve protocol 3.1 explicitly in pqcomm.h

Jacob Champion <jacob.champion@enterprisedb.com> writes:

This is a tiny followup to https://postgr.es/c/0664aa4ff8 that
enshrines the unused 3.1 protocol version as PG_PROTOCOL_RSRV31. The
patch comes from [1]; I just wanted to give people the opportunity to
bikeshed the name (or object to the move?) before it becomes part of a
public header.

+1 for concept, but I agree the name needs bikeshedding. "RSRV"
is unreadable, and people might well mentally expand it to
something involving "server", leading to confusion.

How about "PG_PROTOCOL_RESERVED_31" or
"PG_PROTOCOL_UNUSED_31"?

regards, tom lane

#3Jacob Champion
jacob.champion@enterprisedb.com
In reply to: Tom Lane (#2)
Re: [PATCH] Reserve protocol 3.1 explicitly in pqcomm.h

On Tue, Jan 20, 2026 at 3:10 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

How about "PG_PROTOCOL_RESERVED_31" or
"PG_PROTOCOL_UNUSED_31"?

I'd be fine with either; slight preference for "RESERVED" I suppose?

Thanks!
--Jacob

#4Jelte Fennema-Nio
postgres@jeltef.nl
In reply to: Jacob Champion (#3)
Re: [PATCH] Reserve protocol 3.1 explicitly in pqcomm.h

On Wed Jan 21, 2026 at 12:17 AM CET, Jacob Champion wrote:

I'd be fine with either; slight preference for "RESERVED" I suppose?

RESERVED seems clearer to me. And for people interested in why, the
comment above its definition describes it suffiecently.

#5Jacob Champion
jacob.champion@enterprisedb.com
In reply to: Jelte Fennema-Nio (#4)
Re: [PATCH] Reserve protocol 3.1 explicitly in pqcomm.h

On Tue, Jan 20, 2026 at 11:50 PM Jelte Fennema-Nio <postgres@jeltef.nl> wrote:

RESERVED seems clearer to me. And for people interested in why, the
comment above its definition describes it suffiecently.

Pushed as PG_PROTOCOL_RESERVED_31. Thank you both!

--Jacob