pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Drop support for MSVCRT's %I64 format strings.
Date: Wed, 19 Nov 2025 21:10:30 +0000
Message-ID: <E1vLpRd-000MEH-1b@gemulon.postgresql.org> (raw)

Drop support for MSVCRT's %I64 format strings.

MSVCRT predated C99 and invented non-standard placeholders for 64-bit
numbers, and then later used them in standard macros when C99
<inttypes.h> arrived.  The macros just use %lld etc when building with
UCRT, so there should be no way for our interposed sprintf.c code to
receive the pre-standard kind these days.  Time to drop the code that
parses them.

That code was in fact already dead when commit 962da900 landed, as we'd
disclaimed MSVCRT support a couple of weeks earlier in commit 1758d424,
but patch development overlapped and the history of these macros hadn't
been investigated.

Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/4d8b1a67-aab2-4429-b44b-f03988095939%40eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7ab9b34614c2d6f69070a667787e0b091ecb72b1

Modified Files
--------------
src/port/snprintf.c | 44 --------------------------------------------
1 file changed, 44 deletions(-)



Message-ID: <E1vLpRd-000MEH-1b@gemulon.postgresql.org>
Permalink:  ../E1vLpRd-000MEH-1b@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vLpRd-000MEH-1b@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Drop support for MSVCRT's %I64 format strings.
  In-Reply-To: <E1vLpRd-000MEH-1b@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox