SPI_COPYTUPLE(3)

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

πŸ’– NAME πŸ’–

Hey bestie, this is the manual page for SPI_COPYTUPLE(3) β€” the little PostgreSQL helper that makes a copy of a row in the upper executor context ✨

🌸 SYNOPSIS 🌸

HeapTuple SPI_copytuple(HeapTuple row)

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so SPI_copytuple makes a copy of a row in the upper executor context. This is normally used to return a modified row from a trigger πŸŽ€

In a function declared to return a composite type, use SPI_returntuple instead. Noted, bestie, no cap πŸ’…

⚠️ This function can only be used while connected to SPI. Otherwise, it returns NULL and sets SPI_result to SPI_ERROR_UNCONNECTED. So yeah β€” stay connected, or it's giving error vibes 😭

πŸŽ€ ARGUMENTS πŸŽ€

  • HeapTuple row β€” the row to be copied 🫢

⭐ RETURN VALUE ⭐

The copied row, or NULL on error β€” see SPI_result for an error indication πŸ‘‘


That's the whole vibe, bestie β€” PostgreSQL 16.15, 2026, signing off πŸ§šπŸ’–

πŸ“¦ where this page comes from