3
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4
<title>SPI_copytuple</title>
5
<link rel="stylesheet" href="stylesheet.css" type="text/css">
6
<link rev="made" href="pgsql-docs@postgresql.org">
7
<meta name="generator" content="DocBook XSL Stylesheets V1.64.1">
8
<link rel="home" href="index.html" title="PostgreSQL 8.0.0beta5 Documentation">
9
<link rel="up" href="spi-memory.html" title="39.3.�Memory Management">
10
<link rel="previous" href="spi-spi-pfree.html" title="SPI_pfree">
11
<link rel="next" href="spi-spi-returntuple.html" title="SPI_returntuple">
13
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
14
<a name="spi-spi-copytuple"></a><div class="titlepage">
18
<div class="refnamediv">
20
<p>SPI_copytuple — make a copy of a row in the upper executor context</p>
22
<a name="id2659221"></a><div class="refsynopsisdiv">
24
<pre class="synopsis">HeapTuple SPI_copytuple(HeapTuple <i class="parameter"><tt>row</tt></i>)</pre>
26
<div class="refsect1" lang="en">
27
<a name="id2659239"></a><h2>Description</h2>
28
<p> <tt class="function">SPI_copytuple</tt> makes a copy of a row in the
29
upper executor context. This is normally used to return a modified
30
row from a trigger. In a function declared to return a composite
31
type, use <tt class="function">SPI_returntuple</tt> instead.
34
<div class="refsect1" lang="en">
35
<a name="id2659260"></a><h2>Arguments</h2>
36
<div class="variablelist"><dl>
37
<dt><span class="term"><tt class="literal">HeapTuple <i class="parameter"><tt>row</tt></i></tt></span></dt>
38
<dd><p> row to be copied
42
<div class="refsect1" lang="en">
43
<a name="id2659279"></a><h2>Return Value</h2>
44
<p> the copied row; <tt class="symbol">NULL</tt> only if
45
<i class="parameter"><tt>tuple</tt></i> is <tt class="symbol">NULL</tt>