SPI_COPYTUPLE(3)
π 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 returnsNULLand setsSPI_resulttoSPI_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
- opensuse-leap 16.0: postgresql14-docs 14.24-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms