Postgresql 中文操作指南
SPI_getvalue
SPI_getvalue — 返回指定列的字符串值
SPI_getvalue — return the string value of the specified column
Description
SPI_getvalue 返回指定列的值的字符串表示形式。
SPI_getvalue returns the string representation of the value of the specified column.
结果将返回到使用 palloc 分配的内存中。(您可以在不再需要时使用 pfree 释放内存。)
The result is returned in memory allocated using palloc. (You can use pfree to release the memory when you don’t need it anymore.)
Arguments
-
HeapTuple _row_
-
input row to be examined
-
-
TupleDesc _rowdesc_
-
input row description
-
-
int _colnumber_
-
column number (count starts at 1)
-
Return Value
列值,或 NULL (如果列为空), colnumber 超出范围(将 SPI_result 设置为 SPI_ERROR_NOATTRIBUTE ),或没有可用的输出功能(将 SPI_result 设置为 SPI_ERROR_NOOUTFUNC )。
Column value, or NULL if the column is null, colnumber is out of range (SPI_result is set to SPI_ERROR_NOATTRIBUTE), or no output function is available (SPI_result is set to SPI_ERROR_NOOUTFUNC).