Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.11.4, 10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL)
-
Debian 12
Description
The ST_PointFromWKB() function ignores the SRID parameter and returns 0 regardless of specified SRID parameter.
To reproduce this behavior:
SELECT ST_SRID(ST_PointFromWKB(POINT(1,2), 4326));
Should return 4326, but returns 0.
If creating the point from Well Known Text instead, the SRID is preserved (expected behavior)
SELECT ST_SRID(ST_PointFromText('POINT(1 2)', 4326))
Returns 4326 as expected.
I can also confirm that this problem exists with ST_LineStringFromWKB() and most likely all the ...FromWKB() functions.
Example:
{{SELECT ST_SRID(ST_LineStringFromWKB(LINESTRING(POINT(1.23, 4.56), POINT(4.56,7.89)), 4326));
– Returns 0 (should return 4326)}}