Hackfut Security File Manager
Current Path:
/opt/td-agent/embedded/share/man/man3
opt
/
td-agent
/
embedded
/
share
/
man
/
man3
/
📁
..
📄
SPI_connect.3
(2.18 KB)
📄
SPI_copytuple.3
(1.76 KB)
📄
SPI_cursor_close.3
(1.71 KB)
📄
SPI_cursor_fetch.3
(2.05 KB)
📄
SPI_cursor_find.3
(1.71 KB)
📄
SPI_cursor_move.3
(1.92 KB)
📄
SPI_cursor_open.3
(3.49 KB)
📄
SPI_cursor_open_with_args.3
(3.77 KB)
📄
SPI_cursor_open_with_paramlist.3
(2.78 KB)
📄
SPI_exec.3
(1.72 KB)
📄
SPI_execp.3
(2.65 KB)
📄
SPI_execute.3
(7.86 KB)
📄
SPI_execute_plan.3
(3.14 KB)
📄
SPI_execute_plan_with_paramlist.3
(2.63 KB)
📄
SPI_execute_with_args.3
(3.87 KB)
📄
SPI_finish.3
(2.05 KB)
📄
SPI_fname.3
(1.86 KB)
📄
SPI_fnumber.3
(2.1 KB)
📄
SPI_freeplan.3
(1.7 KB)
📄
SPI_freetuple.3
(1.68 KB)
📄
SPI_freetuptable.3
(2.37 KB)
📄
SPI_getargcount.3
(1.83 KB)
📄
SPI_getargtypeid.3
(2.09 KB)
📄
SPI_getbinval.3
(2.24 KB)
📄
SPI_getnspname.3
(1.78 KB)
📄
SPI_getrelname.3
(1.68 KB)
📄
SPI_gettype.3
(1.87 KB)
📄
SPI_gettypeid.3
(1.79 KB)
📄
SPI_getvalue.3
(2.11 KB)
📄
SPI_is_cursor_plan.3
(2.33 KB)
📄
SPI_keepplan.3
(2.02 KB)
📄
SPI_modifytuple.3
(3.35 KB)
📄
SPI_palloc.3
(1.6 KB)
📄
SPI_pfree.3
(1.68 KB)
📄
SPI_pop.3
(1.45 KB)
📄
SPI_prepare.3
(5.21 KB)
📄
SPI_prepare_cursor.3
(2.53 KB)
📄
SPI_prepare_params.3
(2.34 KB)
📄
SPI_push.3
(2.2 KB)
📄
SPI_repalloc.3
(1.91 KB)
📄
SPI_returntuple.3
(2.12 KB)
📄
SPI_saveplan.3
(2.41 KB)
📄
SPI_scroll_cursor_fetch.3
(2.36 KB)
📄
SPI_scroll_cursor_move.3
(2.41 KB)
📄
dblink.3
(6.49 KB)
📄
dblink_build_sql_delete.3
(3.26 KB)
📄
dblink_build_sql_insert.3
(3.85 KB)
📄
dblink_build_sql_update.3
(4.1 KB)
📄
dblink_cancel_query.3
(2.1 KB)
📄
dblink_close.3
(2.7 KB)
📄
dblink_connect.3
(5.66 KB)
📄
dblink_connect_u.3
(2.73 KB)
📄
dblink_disconnect.3
(2.09 KB)
📄
dblink_error_message.3
(1.82 KB)
📄
dblink_exec.3
(3.73 KB)
📄
dblink_fetch.3
(4.15 KB)
📄
dblink_get_connections.3
(1.7 KB)
📄
dblink_get_notify.3
(2.48 KB)
📄
dblink_get_pkey.3
(2.63 KB)
📄
dblink_get_result.3
(4.86 KB)
📄
dblink_is_busy.3
(1.82 KB)
📄
dblink_open.3
(3.21 KB)
📄
dblink_send_query.3
(2.32 KB)
📄
editline.3
(20.41 KB)
📄
el_deletestr.3
(20.41 KB)
📄
el_end.3
(20.41 KB)
📄
el_get.3
(20.41 KB)
📄
el_getc.3
(20.41 KB)
📄
el_gets.3
(20.41 KB)
📄
el_history.3
(20.41 KB)
📄
el_history_end.3
(20.41 KB)
📄
el_history_init.3
(20.41 KB)
📄
el_init.3
(20.41 KB)
📄
el_insertstr.3
(20.41 KB)
📄
el_line.3
(20.41 KB)
📄
el_parse.3
(20.41 KB)
📄
el_push.3
(20.41 KB)
📄
el_reset.3
(20.41 KB)
📄
el_resize.3
(20.41 KB)
📄
el_set.3
(20.41 KB)
📄
el_source.3
(20.41 KB)
📄
el_tok_end.3
(20.41 KB)
📄
el_tok_init.3
(20.41 KB)
📄
el_tok_line.3
(20.41 KB)
📄
el_tok_reset.3
(20.41 KB)
📄
el_tok_str.3
(20.41 KB)
📄
ffi.3
(850 B)
📄
ffi_call.3
(2.28 KB)
📄
ffi_prep_cif.3
(1.13 KB)
📄
ffi_prep_cif_var.3
(1.29 KB)
📄
jemalloc.3
(71.09 KB)
📄
libexslt.3
(6.37 KB)
📄
libxml.3
(1.59 KB)
📄
libxslt.3
(816 B)
📄
zlib.3
(4.37 KB)
Editing: SPI_prepare.3
'\" t .\" Title: SPI_prepare .\" Author: The PostgreSQL Global Development Group .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Date: 2018 .\" Manual: PostgreSQL 9.6.9 Documentation .\" Source: PostgreSQL 9.6.9 .\" Language: English .\" .TH "SPI_PREPARE" "3" "2018" "PostgreSQL 9.6.9" "PostgreSQL 9.6.9 Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" SPI_prepare \- prepare a statement, without executing it yet .SH "SYNOPSIS" .sp .nf SPIPlanPtr SPI_prepare(const char * \fIcommand\fR, int \fInargs\fR, Oid * \fIargtypes\fR) .fi .SH "DESCRIPTION" .PP \fBSPI_prepare\fR creates and returns a prepared statement for the specified command, but doesn\*(Aqt execute the command\&. The prepared statement can later be executed repeatedly using \fBSPI_execute_plan\fR\&. .PP When the same or a similar command is to be executed repeatedly, it is generally advantageous to perform parse analysis only once, and might furthermore be advantageous to re\-use an execution plan for the command\&. \fBSPI_prepare\fR converts a command string into a prepared statement that encapsulates the results of parse analysis\&. The prepared statement also provides a place for caching an execution plan if it is found that generating a custom plan for each execution is not helpful\&. .PP A prepared command can be generalized by writing parameters ($1, $2, etc\&.) in place of what would be constants in a normal command\&. The actual values of the parameters are then specified when \fBSPI_execute_plan\fR is called\&. This allows the prepared command to be used over a wider range of situations than would be possible without parameters\&. .PP The statement returned by \fBSPI_prepare\fR can be used only in the current invocation of the procedure, since \fBSPI_finish\fR frees memory allocated for such a statement\&. But the statement can be saved for longer using the functions \fBSPI_keepplan\fR or \fBSPI_saveplan\fR\&. .SH "ARGUMENTS" .PP const char * \fIcommand\fR .RS 4 command string .RE .PP int \fInargs\fR .RS 4 number of input parameters ($1, $2, etc\&.) .RE .PP Oid * \fIargtypes\fR .RS 4 pointer to an array containing the OIDs of the data types of the parameters .RE .SH "RETURN VALUE" .PP \fBSPI_prepare\fR returns a non\-null pointer to an SPIPlan, which is an opaque struct representing a prepared statement\&. On error, NULL will be returned, and \fISPI_result\fR will be set to one of the same error codes used by \fBSPI_execute\fR, except that it is set to SPI_ERROR_ARGUMENT if \fIcommand\fR is NULL, or if \fInargs\fR is less than 0, or if \fInargs\fR is greater than 0 and \fIargtypes\fR is NULL\&. .SH "NOTES" .PP If no parameters are defined, a generic plan will be created at the first use of \fBSPI_execute_plan\fR, and used for all subsequent executions as well\&. If there are parameters, the first few uses of \fBSPI_execute_plan\fR will generate custom plans that are specific to the supplied parameter values\&. After enough uses of the same prepared statement, \fBSPI_execute_plan\fR will build a generic plan, and if that is not too much more expensive than the custom plans, it will start using the generic plan instead of re\-planning each time\&. If this default behavior is unsuitable, you can alter it by passing the CURSOR_OPT_GENERIC_PLAN or CURSOR_OPT_CUSTOM_PLAN flag to \fBSPI_prepare_cursor\fR, to force use of generic or custom plans respectively\&. .PP Although the main point of a prepared statement is to avoid repeated parse analysis and planning of the statement, PostgreSQL will force re\-analysis and re\-planning of the statement before using it whenever database objects used in the statement have undergone definitional (DDL) changes since the previous use of the prepared statement\&. Also, if the value of search_path changes from one use to the next, the statement will be re\-parsed using the new \fIsearch_path\fR\&. (This latter behavior is new as of PostgreSQL 9\&.3\&.) See \fBPREPARE\fR(7) for more information about the behavior of prepared statements\&. .PP This function should only be called from a connected procedure\&. .PP SPIPlanPtr is declared as a pointer to an opaque struct type in spi\&.h\&. It is unwise to try to access its contents directly, as that makes your code much more likely to break in future revisions of PostgreSQL\&. .PP The name SPIPlanPtr is somewhat historical, since the data structure no longer necessarily contains an execution plan\&.
Upload File
Create Folder