v4-0004-squash-libpq-Request-protocol-version-3.9999-to-G.patch
application/octet-stream
Filename: v4-0004-squash-libpq-Request-protocol-version-3.9999-to-G.patch
Type: application/octet-stream
Part: 3
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v4-0004
Subject: squash! libpq: Request protocol version 3.9999 to GREASE the ecosystem
| File | + | − |
|---|---|---|
| src/include/libpq/pqcomm.h | 9 | 7 |
From 78960f566a66d1d4aefb4e451d36671889d02d8e Mon Sep 17 00:00:00 2001 From: Jacob Champion <jacob.champion@enterprisedb.com> Date: Fri, 21 Nov 2025 10:44:31 -0800 Subject: [PATCH v4 4/5] squash! libpq: Request protocol version 3.9999 to GREASE the ecosystem Move PG_PROTOCOL_GREASE into the reserved section of the header. --- src/include/libpq/pqcomm.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index a4d04e79f9f..0fe7d8e897d 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -90,21 +90,23 @@ is_unixsock_path(const char *path) /* * The earliest and latest frontend/backend protocol version supported. - * - * PG_PROTOCOL_GREASE is an intentionally unsupported protocol version used - * for GREASE (Generate Random Extensions And Sustain Extensibility). This - * helps ensure that servers properly implement protocol version negotiation - * via NegotiateProtocolVersion. Version 3.9999 was chosen to be safely within - * the valid range but unlikely to ever be implemented. */ #define PG_PROTOCOL_EARLIEST PG_PROTOCOL(3,0) #define PG_PROTOCOL_LATEST PG_PROTOCOL(3,2) -#define PG_PROTOCOL_GREASE PG_PROTOCOL(3,9999) /* * Reserved protocol numbers, which have special semantics: */ +/* + * PG_PROTOCOL_GREASE is an intentionally unsupported protocol version used + * for GREASE (Generate Random Extensions And Sustain Extensibility). This + * helps ensure that servers properly implement protocol version negotiation + * via NegotiateProtocolVersion. Version 3.9999 was chosen to be safely within + * the valid range but unlikely to ever be implemented. + */ +#define PG_PROTOCOL_GREASE PG_PROTOCOL(3,9999) + /* * A client can send a cancel-current-operation request to the postmaster. * This is uglier than sending it directly to the client's backend, but it -- 2.34.1