Re: What is the story behind _SPI_PLAN_MAGIC?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marcelo Fernandes <marcefern7(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: What is the story behind _SPI_PLAN_MAGIC?
Date: 2025-02-03 02:17:03
Message-ID: 290061.1738549023@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Marcelo Fernandes <marcefern7(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michel Pelletier 2025-02-03 03:02:16 Re: Using Expanded Objects other than Arrays from plpgsql
Previous Message Marcelo Fernandes 2025-02-03 01:36:13 What is the story behind _SPI_PLAN_MAGIC?