I have a table with a point geometry defined as "geom geometry(Point,28355)" I am trying to insert data using the following:
INSERT INTO tmpwatscint ( scgid, pipeid, geom )
SELECT s.gid, p.pipe_id, ST_AsText(ST_SetSRID(ST_LineInterpolatePoint(p.geom,ST_LineLocatePoint (p.geom,st_startpoint(s.geom))),28355)) newgeom
FROM "tmpWatPipe" p, "tmpWatServCon" s
WHERE s.pipe_id = p.pipe_id ;
When I run the select statement on its own, it runs fine, however, when I try to insert the data I get an error:
ERROR: Geometry SRID (0) does not match column SRID (28355)
I am running POSTGIS="2.3.2 r15302"