Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iT3ic-0007aW-F0 for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Nov 2019 12:50:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iT3iZ-0008As-CZ for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Nov 2019 12:50:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iT3iY-0008Ah-T1 for pgsql-hackers@lists.postgresql.org; Fri, 08 Nov 2019 12:50:23 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iT3iU-0006sV-TA for pgsql-hackers@postgresql.org; Fri, 08 Nov 2019 12:50:21 +0000 Received: by mail-qk1-x744.google.com with SMTP id z16so5118734qkg.7 for ; Fri, 08 Nov 2019 04:50:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=NSXyY77prVGRu4ilrdDmP5HkGKeirSOsz8MBGi6xBdU=; b=jUx/iencCdx+zabdlO9TqAUHZMuuluqQWVpGrXqrOj6y5fhe80GX5dv0P/LrpC7F78 uedRv8qj9JZYTw2PHjD4myAT+u28XjpnuUoPJkR6Osad1hgd2GHhOoSZlgPDt2e6xV9z b/I7QsbHNJLubJUteptg7q2iSrNu9gmlLnNRa6TUgdgCRdzw+R4N1KZUZvcZnUDHSENu JJmnCtCLCwv94X+sNHvM7WF+40xnu6Z18pBg9dY9/4yGTF+hGWvL4bTaO4SSQUGYPu31 l/G5d1+eueu0Kej9zHb2vX5VC3ozUgwXpgpA8hFcmd3WHvT2q0AkLPXxOUu1GffPZsUg 95+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=NSXyY77prVGRu4ilrdDmP5HkGKeirSOsz8MBGi6xBdU=; b=gjjKVsAJnjwZexeBUXVRg+ikwVTkndXKc7DdQjbXn0mJrllrDTdsBlRD/C7Oby8ABK XruGuZpbSjSzo5TqU91d7HErGshwUxm3NRWV4VT9INTJzXMJ9y61QoX7kp9aDXoMlBGg odVSJ/RsjBW8tBLMI1CeIhVotRaIgG2N/2tJ9PSd73EsVPRda8r1r6muqgAk4xWPxKL3 dXweUy4WuXzZx/4CP+VrTOGnQ6J2pbrLCG8ckxnzBLyYdYtHY1FbPRU9tV/uZZjAKPBP X3g8a6iBJAoePfOipgdafMoHARDQlgjlzgEULJ9NS09wKd4BE5M858qH1G7yR8mMAywc VQ+g== X-Gm-Message-State: APjAAAWLE3wLrWzLQvd0+z5TlVUZrzQLW6vrP0Vnc5bT0JZQHd82Puhn kZwRvzmvUdcQYdJjmtw1iFVxtA== X-Google-Smtp-Source: APXvYqyE9RqFJ04mlHsgRgbjHFaPNJZRns9ihWC3jye9dar+iwmjnMybn2lqjMsakYMi3pZ/mW/VFQ== X-Received: by 2002:a37:8a82:: with SMTP id m124mr8874054qkd.235.1573217416612; Fri, 08 Nov 2019 04:50:16 -0800 (PST) Received: from nimloth.alvh.no-ip.org (ip-49-2-52-196.nyc.us.northamericancoax.com. [196.52.2.49]) by smtp.gmail.com with ESMTPSA id y27sm3336497qtj.49.2019.11.08.04.50.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 04:50:16 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 1E550300AB4; Fri, 8 Nov 2019 09:50:13 -0300 (-03) Date: Fri, 8 Nov 2019 09:50:13 -0300 From: Alvaro Herrera To: Mark Dilger Cc: PostgreSQL-development Subject: Re: SPI refactoring Message-ID: <20191108125013.GA26112@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Nov-07, Mark Dilger wrote: > From 113d42772be2c2abd71fd142cde9240522f143d7 Mon Sep 17 00:00:00 2001 > From: Mark Dilger > Date: Thu, 7 Nov 2019 07:51:06 -0800 > Subject: [PATCH v1 1/5] Deprecating unused SPI error codes. > > The SPI_ERROR_NOOUTFUNC and SPI_ERROR_CONNECT codes, defined in spi.h, > were no longer used anywhere in the sources except nominally in spi.c > where SPI_result_code_string(int code) was translating them to a cstring > for use in error messages. But since the system never returns these > error codes, it seems unlikely anybody still needs to be able to convert > them to a string. > > Removing these from spi.c, from the docs, and from a code comment in > contrib. Leaving the definition in spi.h for backwards compatibility of > third-party applications. Because of PG_MODULE_MAGIC forcing a recompile of modules for each major server version, there's no ABI-stability requirement for these values. If we were to leave the definitions in spi.h and remove the code that handles them, then code could compile but at run-time it would produce the "unrecognized" string. Therefore I think it is better to remove the definitions from spi.h, so that we can be sure that the code will never be needed. I didn't look at the other patches, but I suppose the same argument applies to retaining their defines too. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services