From: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro
Date: Tue, 14 Nov 2023 16:36:44 +0000
Message-ID: <871qcsnvfn.fsf@wibble.ilmari.org> (raw)
In-Reply-To: <202311141620.5utqdkrxibkh@alvherre.pgsql>
References: <202311141620.5utqdkrxibkh@alvherre.pgsql>
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2023-Nov-13, Nathan Bossart wrote:
>
>> Shall we retire this backwards compatibility macro at this point? A search
>> of https://codesearch.debian.net/ does reveal a few external uses, so we
>> could alternatively leave it around and just update Postgres to stop using
>> it, but I don't think it would be too burdensome for extension authors to
>> fix if we removed it completely.
>
> Let's leave the macro around and just remove its uses in PGDG-owned
> code. Having the macro around hurts nothing, and we can remove it in 15
> years or so.
Is there a preprocessor symbol that is defined when building Postgres
itself (and extensions in /contrib/), but not third-party extensions (or
vice versa)? If so, the macro could be guarded by that, so that uses
don't accientally sneak back in.
There's also __attribute__((deprecated)) (and and __declspec(deprecated)
for MSVC), but that can AFAIK only be attached to functions and
variables, not macros, so it would have to be changed to a static inline
function.
- ilmari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: ilmari@ilmari.org, alvherre@alvh.no-ip.org, nathandbossart@gmail.com
Subject: Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro
In-Reply-To: <871qcsnvfn.fsf@wibble.ilmari.org>
References: <202311141620.5utqdkrxibkh@alvherre.pgsql> <871qcsnvfn.fsf@wibble.ilmari.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox