public inbox for [email protected]
help / color / mirror / Atom feedWhat is the story behind _SPI_PLAN_MAGIC?
2+ messages / 2 participants
[nested] [flat]
* What is the story behind _SPI_PLAN_MAGIC?
@ 2025-02-03 01:36 Marcelo Fernandes <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Fernandes @ 2025-02-03 01:36 UTC (permalink / raw)
To: [email protected]
Hi there,
Reading through the SPI code I see this definition:
#define _SPI_PLAN_MAGIC 569278163
Which is used in he _SPI_plan struct in src/include/executor/spi_priv.h:
typedef struct _SPI_plan
{
int magic;
...
}
What is its purpose?
Thank you.
Marcelo
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: What is the story behind _SPI_PLAN_MAGIC?
@ 2025-02-03 02:17 Tom Lane <[email protected]>
parent: Marcelo Fernandes <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2025-02-03 02:17 UTC (permalink / raw)
To: Marcelo Fernandes <[email protected]>; +Cc: [email protected]
Marcelo Fernandes <[email protected]> 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-02-03 02:17 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-02-03 01:36 What is the story behind _SPI_PLAN_MAGIC? Marcelo Fernandes <[email protected]>
2025-02-03 02:17 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox