Re: PRI?64 vs Visual Studio (2022)

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryan Green <dbryan.green@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-12-15T23:45:22Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Test PRI* macros even when we can't test NLS translation.

  2. Avoid requiring Spanish locale to test NLS infrastructure.

  3. Drop support for MSVCRT's float formatting quirk.

  4. Drop support for MSVCRT's %I64 format strings.

  5. Use PRI?64 instead of "ll?" in format strings (continued).

  6. Use <stdint.h> and <inttypes.h> for c.h integers.

  7. Make float exponent output on Windows look the same as elsewhere.

Bryan Green <dbryan.green@gmail.com> writes:
> I should have asked you which version of libintl is being used.  I went
> ahead and jumped to 0.26 and they now gate like this:

>       /* If the current locale value is "C" or "C.<encoding>" or "POSIX",
> 	 we don't load a domain.  Return the MSGID.  */
>       if ((single_locale[0] == 'C'
> 	   && (single_locale[1] == '\0' || single_locale[1] == '.'))
> 	  || strcmp (single_locale, "POSIX") == 0)
> 	break;

Bleah.  I wonder if "POSIX.UTF-8" would work?

regression=# set lc_messages TO 'POSIX.UTF-8';
ERROR:  invalid value for parameter "lc_messages": "POSIX.UTF-8"

... nope.  Back to the drawing board I guess.

I've reverted the latest patch for now.

			regards, tom lane