Re: Fixing MSVC's inability to detect elog(ERROR) does not return

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2026-07-05T22:15:31Z
Lists: pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> On Mon, 6 Jul 2026 at 03:18, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It came to my attention just now that 59c2f03d1 adjusted ereport()
>> to be MSVC-friendly, but did not touch plpy_elog.h's PLy_elog(),
>> which has a borrowed copy of the same logic.  Was that intentional?

> That was unintentional and caused by my unawareness of that version of
> the macro.

>> It seems like we should keep those looking alike.

> Agreed.

Cool.  You wanna fix it, or shall I?

			regards, tom lane



Commits

  1. Rename pg_builtin_integer_constant_p to pg_integer_constant_p

  2. Teach MSVC that elog/ereport ERROR doesn't return