ST_LinestringFromWKB
What is ST_LinestringFromWKB?
ST_LinestringFromWKB is an alias of ST_LineFromWKB. It parses WKB for a LineString and returns the geometry.
1ST_LinestringFromWKB(bytea wkb) → geometry
2ST_LinestringFromWKB(bytea wkb, integer srid) → geometryExists for OGC naming compatibility.
When would you use ST_LinestringFromWKB?
Use ST_LinestringFromWKB for code that mirrors the OGC function naming convention (ST_LinestringFromWKB is the SQL/MM spelling). The behaviour is identical to ST_LineFromWKB.
In practice most PostGIS-only code uses the shorter ST_LineFromWKB.
FAQs
Is it the same as ST_LineFromWKB?
Yes — direct alias.
What happens with non-LineString WKB?
An error. Use ST_GeomFromWKB for type-agnostic inputs.
Is SRID required?
No — defaults to 0 unless EWKB embeds one or it is supplied explicitly.
Why does PostGIS have both names?
For SQL/MM portability. Most databases implementing SQL/MM use the ST_LinestringFromWKB spelling.