Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viEkU-001Jwz-05 for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jan 2026 16:38:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1viEkT-001rtb-0W for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Jan 2026 16:38:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viEkS-001rtR-2i for pgsql-hackers@lists.postgresql.org; Tue, 20 Jan 2026 16:38:33 +0000 Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1viEkQ-001Rze-1q for pgsql-hackers@lists.postgresql.org; Tue, 20 Jan 2026 16:38:32 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id D4527EC018A; Tue, 20 Jan 2026 11:38:30 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 20 Jan 2026 11:38:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1768927110; x=1769013510; bh=2Y1KAJ4S64 TSe5cPXXWGDbePkLYIR/Y5ZJQVX4cB51k=; b=b28COLvycPjnNqZ9ILGKbSUQjc tdibzYt7UhP72uVza30S22dc54QRym76H/f441pa0FSs7ANV6xthzAihUS4QjLnA xd5Y1jvbgxVAJL0lCfztbsJUOAQZk6oYG0tHRWmveqhYOzWu9dbEwEzF9ZzEqnqq rFR7xXwirkvuYmsVeKbMwCv4tcAiHVQsRjvRdJZr58uHFjdknOBqIGHRevxSqZJq hgS9J3X9bJ/eBUo2FonqBcQrdwGs/f1CRw/IHfY80R9kDn6t1SEkGMYg/dk4Q/1j i+lG+rrVv0WuNwoDYAYBQxjGl4nricxy6e2GYe7+lEZUaisu/52qmojRFImw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1768927110; x=1769013510; bh=2Y1KAJ4S64TSe5cPXXWGDbePkLYIR/Y5ZJQ VX4cB51k=; b=Zg8wtXsewjX/0LTEvDzMHygF8qmJ788/OymxjEwFuhze0kVEsSI QFdIrWn4VsX9nQ4OyphZETiKdg6sxaFK71vuegHCc+oW3GIHca02eTgCDK/Wg5ML nEFhHFnZ7QylzmG6YPZaHiXyminPP5CdW2EZAnWreXIAM7MmoZp9K8KG128bQ7bU 6GNTUTIgcVCZ2bjyjqsjRQRMV+ZGH4v5nKJJ5vAeYe/ariiYvpudF0xGfPgZ2YYh dgYAy2Uv97AMjAOYBXJISeEFc9jFOdr39+TsjmQ0l4iYuZWoR1opT/88XVn74vij SPE/nJF1zlgZRnjZ20MHG86L+qndDGTCPSQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddugedtleduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesthdtsfdttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepgeelgeekgfelfeehhffgueekgfdvgfetffekgedvvdevueeiteefuedtvddt veeinecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghdpphhgshhqlhdrsghuih hlugenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegr nhgurhgvshesrghnrghrrgiivghlrdguvgdpnhgspghrtghpthhtohepgedpmhhouggvpe hsmhhtphhouhhtpdhrtghpthhtohepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhg pdhrtghpthhtohepthhhohhmrghsrdhmuhhnrhhosehgmhgrihhlrdgtohhmpdhrtghpth htohepphhoshhtghhrvghssehjvghlthgvfhdrnhhlpdhrtghpthhtohepphhgshhqlhdq hhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Jan 2026 11:38:30 -0500 (EST) Date: Tue, 20 Jan 2026 11:38:29 -0500 From: Andres Freund To: Peter Eisentraut Cc: Jelte Fennema-Nio , PostgreSQL Hackers , Thomas Munro Subject: Re: Make copyObject work in C++ Message-ID: References: <4d8b9e53-3f37-43f0-a4aa-5bda9c7961b3@eisentraut.org> <4e82f77b-acad-4356-94f6-8255135fb36b@eisentraut.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e82f77b-acad-4356-94f6-8255135fb36b@eisentraut.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-01-20 17:28:00 +0100, Peter Eisentraut wrote: > On 17.01.26 16:25, Jelte Fennema-Nio wrote: > > > AFAICT, the minimum changes to get a minimum test module to work are > > > > > > - fix for "restrict", recently committed > > > - disable warning about zero-length arrays, seems trivial > > > - named designated initializers > > > > Correct, I've now restructured the commits to have the module > > introduction as the first one. Then all the other commits, both fix a > > macro to work in C++ and add some usage of those macros as coverage to > > the previously added module. > > I have split your first patch further. For a start, I left out the > PG_MODULE_MAGIC*-related changes and disabled the module under MSVC. This > has been committed. I plan to let the buildfarm run with it for a day or > two and then add in the basic MSVC support. Seems like billbug doesn't like this: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=billbug&dt=2026-01-20%2016%3A00%3A02 gmake[1]: Entering directory '/home/marcel/build-farm-20/buildroot/HEAD/pgsql.build/src/test/modules/test_cplusplusext' g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -I. -I. -I../../../../src/include -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -I/usr/openssl/3/include -I/usr/include/libxml2 -c -o test_cplusplusext.o test_cplusplusext.cpp In file included from ../../../../src/include/postgres.h:48, from test_cplusplusext.cpp:18: ../../../../src/include/c.h:158:21: error: '_Noreturn' does not name a type; did you mean 'pg_noreturn'? 158 | #define pg_noreturn _Noreturn | ^~~~~~~~~ ../../../../src/include/c.h:918:1: note: in expansion of macro 'pg_noreturn' 918 | pg_noreturn extern void ExceptionalCondition(const char *conditionName, | ^~~~~~~~~~~ ../../../../src/include/lib/stringinfo.h: In function 'void initStringInfoFromString(StringInfo, char*, int)': ../../../../src/include/c.h:890:25: error: 'ExceptionalCondition' was not declared in this scope 890 | ExceptionalCondition(#condition, __FILE__, __LINE__); \\ | ^~~~~~~~~~~~~~~~~~~~ ../../../../src/include/lib/stringinfo.h:177:9: note: in expansion of macro 'Assert' 177 | Assert(data[len] == '\\0'); | ^~~~~~ ../../../../src/include/utils/elog.h: At global scope: ../../../../src/include/c.h:158:21: error: '_Noreturn' does not name a type; did you mean 'pg_noreturn'? 158 | #define pg_noreturn _Noreturn | ^~~~~~~~~ ../../../../src/include/utils/elog.h:471:1: note: in expansion of macro 'pg_noreturn' 471 | pg_noreturn extern void ReThrowError(ErrorData *edata); | ^~~~~~~~~~~ ../../../../src/include/c.h:158:21: error: '_Noreturn' does not name a type; did you mean 'pg_noreturn'? 158 | #define pg_noreturn _Noreturn | ^~~~~~~~~ ../../../../src/include/utils/elog.h:473:1: note: in expansion of macro 'pg_noreturn' 473 | pg_noreturn extern void pg_re_throw(void); | ^~~~~~~~~~~ Greetings, Andres Freund