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
- alpine 3.23: postgresql18-doc 18.6-r0 Β· PostgreSQL
- alpine 3.24: postgresql18-doc 18.6-r0 Β· PostgreSQL
- arch rolling: postgresql 18.6-4 Β· PostgreSQL
- fedora 43: postgresql-server-devel 18.6-1.fc43 Β· PostgreSQL
- fedora 43: postgresql-server-devel 18.6-1.fc43 Β· PostgreSQL
- fedora 44: postgresql-server-devel 18.6-1.fc44 Β· PostgreSQL
- fedora 44: postgresql-server-devel 18.6-1.fc44 Β· PostgreSQL
- nixos 26.05: postgresql 18.6
- ubuntu resolute: postgresql-doc-18 18.6-0ubuntu0.26.04.1 Β· PostgreSQL
- ubuntu stonking: postgresql-doc-18 18.6-3build2 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms