Re: Using defines for protocol characters
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, Tatsuo Ishii <ishii@sraoss.co.jp>, davecramer@gmail.com, tgl@sss.pgh.pa.us, peter@eisentraut.org, robertmhaas@gmail.com, smithpb2250@gmail.com, pgsql-hackers@lists.postgresql.org
Date: 2023-08-17T00:31:55Z
Lists: pgsql-hackers
On Wed, Aug 16, 2023 at 12:29:56PM -0700, Nathan Bossart wrote:
> I moved the definitions out to a separate file in v6.
Looks sensible seen from here.
This patch is missing the installation of protocol.h in
src/tools/msvc/Install.pm for MSVC. For pqcomm.h, we are doing that:
lcopy('src/include/libpq/pqcomm.h', $target . '/include/internal/libpq/')
|| croak 'Could not copy pqcomm.h';
So adding two similar lines for protocol.h should be enough (I assume,
did not test).
In fe-exec.c, we still have a few things for the type of objects to
work on:
- 'S' for statement.
- 'P' for portal.
Should these be added to protocol.h? They are part of the extended
protocol.
The comment at the top of PQsendTypedCommand() mentions 'C' and 'D',
but perhaps these should be updated to the object names instead?
pqFunctionCall3(), for PQfn(), has a few more hardcoded characters for
its status codes. I'm OK to do things incrementally so it's fine by
me to not add them now, just noticing on the way what could be added
to this new header.
--
Michael
Commits
-
Introduce macros for protocol characters.
- f4b54e1ed985 17.0 landed
-
Remove configure check for z_streamp
- eeb4eeea2c52 17.0 cited