SPI_COPYTUPLE(3)
β¨ SPI_copytuple(3) β¨
okay so bestie, this is the PostgreSQL 18.6 Documentation page for SPI_copytuple(3), and she's here to copy a row. no cap. let's go π«Ά
π NAME π
SPI_copytuple β make a copy of a row in the upper executor context.
π¦ SYNOPSIS π¦
HeapTuple SPI_copytuple(HeapTuple row)
π DESCRIPTION π
SPI_copytuple makes a copy of a row in the upper executor context. That's literally her whole thing. 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.
Important bestie: This function can only be used while connected to SPI. Otherwise, it returnsNULLand setsSPI_resulttoSPI_ERROR_UNCONNECTED.
π ARGUMENTS π
HeapTuple rowβ row to be copied
π RETURN VALUE π
the copied row, or NULL on error (see SPI_result for an error indication)
and that's the whole vibe π mwah! this page is from PostgreSQL 18.6, dated 2026. now go return that modified row from a trigger, bestie π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql18-docs 18.6-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms