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.94.2) (envelope-from ) id 1r2wmy-001Vbj-17 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Nov 2023 17:01:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r2wmw-009Z8L-12 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Nov 2023 17:01:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r2wmv-009Z8D-NW for pgsql-hackers@lists.postgresql.org; Tue, 14 Nov 2023 17:01:21 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r2wmt-006QCq-0T for pgsql-hackers@postgresql.org; Tue, 14 Nov 2023 17:01:21 +0000 Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-357ccaf982eso20978855ab.0 for ; Tue, 14 Nov 2023 09:01:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699981277; x=1700586077; darn=postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=X75I7PJID0DVbv8hLd5lk0dl4k8c//dnzD2S8oARnH0=; b=hMYzLJPSdLepYNNO+nX7kmpl98g6arr6Hl12oiy1HAJmFmG8vEhUOdLrJfpxjJeMeN XWVLTqhRZND/yYm1Z11I2IIYKzKeK+0n/0iJ4J87T7PdiUZ3XNLmdKZvbjGZhRQPoO81 nAZ5ZXorFJzoC2IMEyidCn1QFDYl08q+N4DpRcURYIuo1o2Nhi+eqnKyNhdUFIqdBv1f H0xQi5KWXn+4T33aXmfI8nAM5E7l6dCeyuGFnFYivt82C+lqA2Va0mJFhc9Ub+LL/Dn0 84fb/tIhHcNbH+S0Q5xZh9fIs9DH6jh0T/jMPqpGtmMWUMA5g2godYuJM/876P0jjmii sNoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699981277; x=1700586077; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=X75I7PJID0DVbv8hLd5lk0dl4k8c//dnzD2S8oARnH0=; b=mi6yj/PVwvDOdm2sV/gHs61o8adOUIP/zhHkEhWy+EV8DtAdzEjFkvwJO4W2eE7omv zis+ryAKl8hj/PvfO68w9t7u1MePtTcOd+HsZZL8SQiXqTOmT688b4X21LOCKudJlTqv ZkjvGL3b+qR1uBkGEmp3igFupN4eG3w11l5axJKPzD1+BSWRg4bTvExK95C4rC0k5jWm 03aAugd/MX/XBhacxqyMO0wLjJL/wtTgZfulMjOeqQxdyC83bL/GI3OQffvx4KKLAba7 mykHc299Bkpgkii4Q8ZJTgEOztOVSptVxf7IaZIOzbx79l4CMKSFrnWTE5cajMwPz8ZX zEGA== X-Gm-Message-State: AOJu0YwLkQdq3G1mp/qLF0Cnl3TWQlxF+BAoWEVmrqoDVgIh5UvbQ2pG Z39Mhc47E3vfclfUGZRkn/g= X-Google-Smtp-Source: AGHT+IGFwzGJYWctf1ButMwFFUqhG+AEb+TiM58dWxX/qzUNESBT/EjcYY/G4lAfyvCYC3KcrTeULw== X-Received: by 2002:a05:6e02:1645:b0:35a:b3d4:e4b1 with SMTP id v5-20020a056e02164500b0035ab3d4e4b1mr12444623ilu.26.1699981277131; Tue, 14 Nov 2023 09:01:17 -0800 (PST) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id h14-20020a056e020d4e00b00359d156386csm558633ilj.4.2023.11.14.09.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 09:01:16 -0800 (PST) Date: Tue, 14 Nov 2023 11:01:15 -0600 From: Nathan Bossart To: Dagfinn Ilmari =?iso-8859-1?Q?Manns=E5ker?= Cc: Alvaro Herrera , pgsql-hackers@postgresql.org Subject: Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro Message-ID: <20231114170115.GB2062604@nathanxps13> References: <202311141620.5utqdkrxibkh@alvherre.pgsql> <871qcsnvfn.fsf@wibble.ilmari.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <871qcsnvfn.fsf@wibble.ilmari.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Nov 14, 2023 at 04:36:44PM +0000, Dagfinn Ilmari Mannsåker wrote: > 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. I'm not aware of anything like that. > 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. It might be worth introducing pg_attribute_deprecated() in c.h. I'm not too worried about this particular macro, but it seems handy in general. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com