Re: Make copyObject work in C++
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Jelte Fennema-Nio <postgres@jeltef.nl>, Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Thomas Munro <thomas.munro@gmail.com>
Date: 2026-01-26T10:29:42Z
Lists: pgsql-hackers
On 25.01.26 18:52, Jelte Fennema-Nio wrote: > On Sun Jan 25, 2026 at 5:50 PM CET, Andres Freund wrote: >> I'm pretty sceptical this is the right direction. > > The only other option I can think of is not supporting C++ extension on > MSVC unless they are compiled with C++20 (or later). I don't > particularly care about Windows C++ extensions myself, so I personally > would be fine with that choice. It seems a bit harsh, though. Maybe it would be enough to only support PG_MODULE_MAGIC (without arguments) in C++ for now. That would still require removing the named initializers inside PG_MODULE_MAGIC_DATA(), but that's only an internal change, and it would not affect C-language users of PG_MODULE_MAGIC_EXT, and we wouldn't lock ourselves into a particular style in C++. Then, maybe in a couple of years, when C++20 is more widely available, we could enable PG_MODULE_MAGIC_EXT for C++, or design an alternative construct for C++.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Enable test_cplusplusext with MSVC
- c05ad248f99c 19 (unreleased) landed
-
Disable some C++ warnings in MSVC
- 82a7cbea747c 19 (unreleased) landed
-
meson: Make room for C++-only warning flags for MSVC
- 4c83f1253593 19 (unreleased) landed
-
Make fixed-length list building macros work in C++
- f8e7ca328510 19 (unreleased) landed
-
Make unconstify and unvolatize use StaticAssertVariableIsOfTypeMacro
- 258248d0bdbf 19 (unreleased) landed
-
Use typeof everywhere instead of compiler specific spellings
- e2308350c9b7 19 (unreleased) landed
-
Test List macros in C++ extensions
- 3d28ecb5ac76 19 (unreleased) landed
-
Test most StaticAssert macros in C++ extensions
- 451650eaacd5 19 (unreleased) landed
-
Revert "Change copyObject() to use typeof_unqual"
- 0af05b5dbb42 19 (unreleased) landed
-
Fix for C++ compatibility
- b4555cb070f1 19 (unreleased) landed
-
tests: Add a test C++ extension module
- 476b35d4e311 19 (unreleased) landed