SPI_execp <refpurpose>execute a statement in read/write mode</refpurpose> — 読み書きモードで文を実行する
int SPI_execp(SPIPlanPtrplan, Datum *values, const char *nulls, longcount)
<function>SPI_execp</function> is the same as
<function>SPI_execute_plan</function>, with the latter's
<parameter>read_only</parameter> parameter always taken as
<literal>false</literal>.
SPI_execpは、常にread_onlyパラメータをfalseとしたSPI_execute_planと同じです。
SPIPlanPtr plan
prepared statement (returned by <function>SPI_prepare</function>)
(SPI_prepareで返される)準備済み文
Datum * valuesAn array of actual parameter values. Must have same length as the statement's number of arguments. 実パラメータ値の配列。 文の引数の数と同じ長さでなければなりません。
const char * nullsAn array describing which parameters are null. Must have same length as the statement's number of arguments. どのパラメータがNULLであるかを示す配列。 文の引数の数と同じ長さでなければなりません。
If <parameter>nulls</parameter> is <symbol>NULL</symbol> then
<function>SPI_execp</function> assumes that no parameters
are null. Otherwise, each entry of the <parameter>nulls</parameter>
array should be <literal>' '</literal> if the corresponding parameter
value is non-null, or <literal>'n'</literal> if the corresponding parameter
value is null. (In the latter case, the actual value in the
corresponding <parameter>values</parameter> entry doesn't matter.) Note
that <parameter>nulls</parameter> is not a text string, just an array:
it does not need a <literal>'\0'</literal> terminator.
nullsがNULLの場合、SPI_execpはすべてのパラメータがNULLではないとみなします。
さもなければ、nulls配列の各項目は、対応するパラメータが非NULLならば' '、対応するパラメータがNULLならば'n'です。
(後者の場合、values内の対応する値は注意されません。)
nullsはテキスト文字列ではなく単なる配列であることに注意してください。
'\0'終端は必要ありません。
long count
maximum number of rows to return,
or <literal>0</literal> for no limit
返される行の最大数。無制限なら0。
See <function>SPI_execute_plan</function>.
SPI_execute_planを参照してください。
<varname>SPI_processed</varname> and
<varname>SPI_tuptable</varname> are set as in
<function>SPI_execute</function> if successful.
成功時、SPI_execute同様にSPI_processedとSPI_tuptableが設定されます。