Re: [PATCH] Refactor pqformat.{c,h} and protocol.h - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: [PATCH] Refactor pqformat.{c,h} and protocol.h
Date
Msg-id ZpaR3H5EC7UMo32j@nathan
Whole thread Raw
In response to [PATCH] Refactor pqformat.{c,h} and protocol.h  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: [PATCH] Refactor pqformat.{c,h} and protocol.h
List pgsql-hackers
On Tue, Jul 16, 2024 at 04:09:44PM +0300, Aleksander Alekseev wrote:
> - Patch 1 replaces all the char's with PqMsg's

Thanks.  I'll look into committing this one in the near future.

> - Patch 2 makes PqMsg an enum. This ensures that the problem will not
> appear again in the future and also gives us a bit more type-safety.

This was briefly brought up in the discussion that ultimately led to
protocol.h [0].  I don't have a particularly strong opinion on the matter,
but I will note that protocol.h was intended to be easily usable in
third-party code, and changing it from characters to an enum from v17 to
v18 might cause some extra code churn.

[0] https://postgr.es/m/20230807091044.jjgsl2rgheazaung%40alvherre.pgsql

-- 
nathan



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [EXTERNAL] Re: Add non-blocking version of PQcancel
Next
From: Pierrick Chovelon
Date:
Subject: Differents execution times with gin index, prepared statement and literals.