Re: What is the story behind _SPI_PLAN_MAGIC? - Mailing list pgsql-general

From Tom Lane
Subject Re: What is the story behind _SPI_PLAN_MAGIC?
Date
Msg-id 290061.1738549023@sss.pgh.pa.us
Whole thread Raw
Responses Re: What is the story behind _SPI_PLAN_MAGIC?
List pgsql-general
Marcelo Fernandes <marcefern7@gmail.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



pgsql-general by date:

Previous
From: Marcelo Fernandes
Date:
Subject: Logging queries executed by SPI_execute
Next
From: Pavel Stehule
Date:
Subject: Re: Logging queries executed by SPI_execute