SPI\_getvalue

|       SPI\_getvalue        |                                |                                 |                  |                               |
|:--------------------------:|--------------------------------|---------------------------------|------------------|-------------------------------|
|[Prev](spi-spi-fnumber.html)|[Up](spi-interface-support.html)|47.2. Interface Support Functions|[Home](index.html)| [Next](spi-spi-getbinval.html)|

---

[]()

## SPI\_getvalue

SPI\_getvalue — return the string value of the specified column

## Synopsis

```
char * SPI_getvalue(HeapTuple row, TupleDesc rowdesc, int colnumber)

```

## Description

`SPI_getvalue` returns the string representation of the value of the specified column.

 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

 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`).

---

|[Prev](spi-spi-fnumber.html)|[Up](spi-interface-support.html)| [Next](spi-spi-getbinval.html)|
|:---------------------------|:------------------------------:|------------------------------:|
|        SPI\_fnumber        |       [Home](index.html)       |         SPI\_getbinval        |

 // \<![CDATA[ \<-- For SVG support if ('WebSocket' in window) { (function() { function refreshCSS() { var sheets = [].slice.call(document.getElementsByTagName("link")); var head = document.getElementsByTagName("head")[0]; for (var i = 0; i \< sheets.length; ++i) { var elem = sheets[i]; head.removeChild(elem); var rel = elem.rel; if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") { var url = elem.href.replace(/(&|\\?)\_cacheOverride=\\d+/, ''); elem.href = url + (url.indexOf('?') \>= 0 ? '&' : '?') + '\_cacheOverride=' + (new Date().valueOf()); } head.appendChild(elem); } } var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; var address = protocol + window.location.host + window.location.pathname + '/ws'; var socket = new WebSocket(address); socket.onmessage = function(msg) { if (msg.data == 'reload') window.location.reload(); else if (msg.data == 'refreshcss') refreshCSS(); }; console.log('Live reload enabled.'); })(); } // ]]\>