Re: remove pg_restrict workaround

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: remove pg_restrict workaround
Date: 2026-01-02 23:23:37
Message-ID: CAGECzQRoD7chJP1-dneSrhxUJv+BRcigoGOO4UwGzaShLot2Yw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 29 Oct 2025 at 08:04, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> Committed with a backward compatibility define.

I'm working on adding a C++ extension module to my copyObject
patchset[1]. But turns out that this change has completely broken
compiling C++ extensions on MSVC. This is happening due to
__declspec(restrict) being replaced by __declspec(__restrict), which
the original comments also mentioned as the reason for having our own
flavor. This replacement then makes the core of a corecrt_malloc.h
MSVC header invalid[2].

So I think we should revert this patch.

[1]: https://www.postgresql.org/message-id/flat/CAGECzQR21OnnKiZO_1rLWO0-16kg1JBxnVq-wymYW0-_1cUNtg(at)mail(dot)gmail(dot)com
[2]: https://cirrus-ci.com/task/5516067944005632?logs=build#L2031-L2044

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-01-02 23:32:40 Re: pgsql: Ignore PlaceHolderVars when looking up statistics
Previous Message Dharin Shah 2026-01-02 23:13:36 [PATCH] tests: verify renamed index functionality in alter_table