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

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter@eisentraut.org>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2026-07-05T21:54:40Z
Lists: pgsql-hackers
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.

David



Commits

  1. Rename pg_builtin_integer_constant_p to pg_integer_constant_p

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