SPI_getvalue

Name

SPI_getvalue --  Returns the string value of the specified attribute 指定属性の値を文字列として返します。

Synopsis

SPI_getvalue(tuple, tupdesc, fnumber)

入力

HeapTuple tuple

Input tuple to be examined

処理対象のタプル。

TupleDesc tupdesc

Input tuple description

対象タプルの記述子。

int fnumber

Attribute number

属性番号。

出力

char *

Attribute value or NULL if

属性値。以下の場合はNULLが返ります。

attribute is NULL
返す属性が NULL の場合。
fnumber is out of range (SPI_result set to SPI_ERROR_NOATTRIBUTE)
引数 fnumber が範囲外の場合。 ( SPI_result は SPI_ERROR_NOATTRIBUTE に設定されます。)
no output function available (SPI_result set to SPI_ERROR_NOOUTFUNC)
出力関数が無い場合。 ( SPI_result は SPI_ERROR_NOOUTFUNC に設定 されます。)

説明

SPI_getvalue returns an external (string) representation of the value of the specified attribute.

SPI_getvalue は指定属性の値の外部表現(文字列表 現)を返します。

使い方

Attribute numbers are 1 based.

属性番号は 1 から始まります。

アルゴリズム

Allocates memory as required by the value.

その値を格納するために必要とされる分のメモリを割り当てます。