Postgresql 中文操作指南

SPI_getargcount

SPI_getargcount — 返回 SPI_prepare 准备的语句需要的参数数

SPI_getargcount — return the number of arguments needed by a statement prepared by SPI_prepare

Synopsis

int SPI_getargcount(SPIPlanPtr plan)

Description

SPI_getargcount 返回执行 SPI_prepare 准备的语句所需的参数数。

SPI_getargcount returns the number of arguments needed to execute a statement prepared by SPI_prepare.

Arguments

  • SPIPlanPtr _plan_

    • prepared statement (returned by SPI_prepare)

Return Value

plan 预期的参数数。如果 planNULL 或无效,则 SPI_result 设置为 SPI_ERROR_ARGUMENT ,并返回 -1。

The count of expected arguments for the plan. If the plan is NULL or invalid, SPI_result is set to SPI_ERROR_ARGUMENT and -1 is returned.