Re: Request for comment on setting binary format output per session - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Request for comment on setting binary format output per session
Date
Msg-id CA+TgmoYo+1ZjTg=q8=CifQ9Pm35icoURvtJqjz24YoWLd4BgPA@mail.gmail.com
Whole thread Raw
In response to Re: Request for comment on setting binary format output per session  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Request for comment on setting binary format output per session  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Apr 17, 2023 at 4:22 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The fact that we've gotten away without adding *any* new message types
> for about twenty years suggests to me that the growth rate isn't such
> that we need sub-message-types yet.  I'd keep the structure the same
> until such time as we can't choose a plausible code value for a new
> message, and then maybe add the "x-and-subtype" convention Jeff suggests.

One thing I think we should do in this area is introduce #defines for
all the message type codes and use those instead of having hard-coded
constants everywhere.

I'm not brave enough to tackle that day, but the only reason the
current situation isn't a disaster is because every place we use e.g.
'Z' we generally also have a comment that mentions ReadyForQuery. If
it weren't for that, this would be pretty un-greppable.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: [PATCH] Compression dictionaries for JSONB
Next
From: Tom Lane
Date:
Subject: Re: Request for comment on setting binary format output per session