SPI_COPYTUPLE(3)

πŸ“¦ version 14.24, in opensuse-leap 16.0

πŸ’– NAME β€” SPI_COPYTUPLE(3) πŸ’–

okay so bestie, this is the SPI_COPYTUPLE(3) page from the PostgreSQL 14.24 Documentation. It's all about SPI_copytuple β€” the function that makes a copy of a row in the upper executor context. Slay.

✨ SYNOPSIS ✨

HeapTuple SPI_copytuple(HeapTuple row)

πŸ’… DESCRIPTION πŸ’…

SPI_copytuple makes a copy of a row in the upper executor context. No cap, that's the whole vibe. This is normally used to return a modified row from a trigger. πŸŽ€

If you're in a function declared to return a composite type, do not use this one β€” use SPI_returntuple instead. iykyk.

⚠️ This function can only be used while connected to SPI. Otherwise, it returns NULL and sets SPI_result to SPI_ERROR_UNCONNECTED. That's the vibe check, bestie.

🧚 ARGUMENTS 🧚

  • HeapTuple row β€” the row to be copied. That's it. That's the argument. πŸ’–

🌸 RETURN VALUE 🌸

You get back the copied row, or NULL on error (see SPI_result for an error indication). πŸ’…


✨ sign-off time ✨

πŸ’– That's the whole page, bestie β€” brought to you by PostgreSQL 14.24, dated 2026, and filed under SPI_COPYTUPLE(3). Now go copy that tuple, periodt. πŸ’–

πŸ“¦ where this page comes from