Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Refactor pqformat.{c,h} and protocol.h
Date: 2024-07-16 15:29:32
Message-ID: ZpaR3H5EC7UMo32j@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pierrick Chovelon 2024-07-16 15:43:49 Differents execution times with gin index, prepared statement and literals.
Previous Message Alvaro Herrera 2024-07-16 15:22:25 Re: [EXTERNAL] Re: Add non-blocking version of PQcancel