]> begriffs open source - ai-pg/blob - full-docs/man3/SPI_getargtypeid.3
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man3 / SPI_getargtypeid.3
1 '\" t
2 .\"     Title: SPI_getargtypeid
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_GETARGTYPEID" "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_getargtypeid \- return the data type OID for an argument of a statement prepared by \fBSPI_prepare\fR
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 Oid SPI_getargtypeid(SPIPlanPtr \fIplan\fR, int \fIargIndex\fR)
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBSPI_getargtypeid\fR
40 returns the OID representing the type for the
41 \fIargIndex\fR\*(Aqth argument of a statement prepared by
42 \fBSPI_prepare\fR\&. First argument is at index zero\&.
43 .SH "ARGUMENTS"
44 .PP
45 SPIPlanPtr \fIplan\fR
46 .RS 4
47 prepared statement (returned by
48 \fBSPI_prepare\fR)
49 .RE
50 .PP
51 int \fIargIndex\fR
52 .RS 4
53 zero based index of the argument
54 .RE
55 .SH "RETURN VALUE"
56 .PP
57 The type OID of the argument at the given index\&. If the
58 \fIplan\fR
59 is
60 NULL
61 or invalid, or
62 \fIargIndex\fR
63 is less than 0 or not less than the number of arguments declared for the
64 \fIplan\fR,
65 \fISPI_result\fR
66 is set to
67 SPI_ERROR_ARGUMENT
68 and
69 InvalidOid
70 is returned\&.