SPI_FREEPLAN(3)

πŸ¦‹ NAME πŸ¦‹

okay so bestie, welcome to SPI_FREEPLAN(3), straight outta the PostgreSQL 18.6 Documentation. this one is SPI_freeplan β€” free a previously saved prepared statement. literally the cleanup bestie we all need. πŸ’–


✨ SYNOPSIS ✨

int SPI_freeplan(SPIPlanPtr plan)

🌸 DESCRIPTION 🌸

SPI_freeplan releases a prepared statement previously returned by SPI_prepare or saved by SPI_keepplan or SPI_saveplan.

no cap, it's giving prepared-statement cleanup queen. 🧹✨


πŸŽ€ ARGUMENTS πŸŽ€

  • SPIPlanPtr plan β€” pointer to statement to free. yeah bestie, just hand over the pointer and let her do her thing. 🫢

⭐ RETURN VALUE ⭐

  • 0 on success; SPI_ERROR_ARGUMENT if plan is NULL or invalid.
so if you get 0, slay. if you get SPI_ERROR_ARGUMENT, check that plan, because she said NULL or invalid and meant it. πŸ’…

PostgreSQL 18.6 Β· 2026 Β· SPI_FREEPLAN(3) β€” that's the footer, bestie. now go free those plans responsibly πŸ’–βœ¨πŸŽ€