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 1tem1M-00FYWC-7m for pgsql-general@arkaria.postgresql.org; Mon, 03 Feb 2025 02:17:08 +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 1tem1L-009TS8-Aw for pgsql-general@arkaria.postgresql.org; Mon, 03 Feb 2025 02:17:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tem1L-009TS0-0C for pgsql-general@lists.postgresql.org; Mon, 03 Feb 2025 02:17:07 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tem1I-002s45-2e for pgsql-general@lists.postgresql.org; Mon, 03 Feb 2025 02:17:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 5132H3Bq290062; Sun, 2 Feb 2025 21:17:03 -0500 From: Tom Lane To: Marcelo Fernandes cc: pgsql-general@lists.postgresql.org Subject: Re: What is the story behind _SPI_PLAN_MAGIC? In-reply-to: References: Comments: In-reply-to Marcelo Fernandes message dated "Mon, 03 Feb 2025 14:36:13 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <290060.1738549023.1@sss.pgh.pa.us> Date: Sun, 02 Feb 2025 21:17:03 -0500 Message-ID: <290061.1738549023@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Marcelo Fernandes writes: > Reading through the SPI code I see this definition: > #define _SPI_PLAN_MAGIC 569278163 > What is its purpose? Just to catch programming errors, ie passing the wrong pointer value to some SPI function. See the checks for it in spi.c. regards, tom lane