]> begriffs open source - ai-pg/blob - full-docs/src/sgml/man3/SPI_getvalue.3
WIP: toc builder
[ai-pg] / full-docs / src / sgml / man3 / SPI_getvalue.3
1 '\" t
2 .\"     Title: SPI_getvalue
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "SPI_GETVALUE" "3" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 SPI_getvalue \- return the string value of the specified column
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 char * SPI_getvalue(HeapTuple \fIrow\fR, TupleDesc \fIrowdesc\fR, int \fIcolnumber\fR)
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBSPI_getvalue\fR
40 returns the string representation of the value of the specified column\&.
41 .PP
42 The result is returned in memory allocated using
43 \fBpalloc\fR\&. (You can use
44 \fBpfree\fR
45 to release the memory when you don\*(Aqt need it anymore\&.)
46 .SH "ARGUMENTS"
47 .PP
48 HeapTuple \fIrow\fR
49 .RS 4
50 input row to be examined
51 .RE
52 .PP
53 TupleDesc \fIrowdesc\fR
54 .RS 4
55 input row description
56 .RE
57 .PP
58 int \fIcolnumber\fR
59 .RS 4
60 column number (count starts at 1)
61 .RE
62 .SH "RETURN VALUE"
63 .PP
64 Column value, or
65 NULL
66 if the column is null,
67 \fIcolnumber\fR
68 is out of range (\fISPI_result\fR
69 is set to
70 SPI_ERROR_NOATTRIBUTE), or no output function is available (\fISPI_result\fR
71 is set to
72 SPI_ERROR_NOOUTFUNC)\&.