All Products
Search
Document Center

PolarDB:ST_BinData

Last Updated:Mar 28, 2026

Returns user-defined binary data (bytea) attached to an sfmesh or material object. Use this function to retrieve data previously stored with ST_SetBinData.

Syntax

bytea ST_BinData(sfmesh sfmeshObject);
bytea ST_BinData(material material);

Parameters

ParameterDescription
sfmeshObjectThe sfmesh object.
materialThe material object.

Description

ST_BinData is the getter counterpart of ST_SetBinData. Call ST_SetBinData first to attach binary data to an object, then call ST_BinData to retrieve it.

Examples

The following example sets binary data on an sfmesh object using ST_SetBinData, then retrieves it with ST_BinData:

SELECT ST_BinData(ST_SetBinData(the_mesh, 'abc'::bytea))
FROM t_table;

Result:

\x616263

See also

  • ST_SetBinData — sets user-defined binary data on an sfmesh or material object