id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 4700,Internal getsrid calls fail against PostGIS 2.0,PaulFMichell,warmerdam,"We have just upgraded our server to PostGIS 2.0 from 1.5 and the following code now outputs an error message to the console: OGRLayer := OGR_DS_ExecuteSQL(InputOGRDataSource, PChar('SELECT * FROM ""MasterMap"".""structure"" WHERE st_intersects(""wkb_geometry"", st_geomfromtext(''MULTIPOLYGON(((479072.9 260525.1,479072.9 261033.4,479870.6 261033.4,479870.6 260525.1,479072.9 260525.1)))'', 27700))'), Nil, Nil); OGR_DS_CopyLayer(OutputOGRDataSource, OGRLayer, PChar('Test'), OutputOptions); The error output is: --------- ERROR 1: ERROR: function getsrid(geometry) does not exist LINE 1: SELECT getsrid(""wkb_geometry"") FROM (SELECT * FROM ""MasterMa... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. --------- We do not call getsrid in our code at all, so it must be called internally by the DLL. I think the getsrid function has been removed in PostGIS 2.0 and replaced by st_srid. We have tested this with gdal20dev.dll (7/6/2012 SVN). ",defect,closed,normal,1.9.2,OGR_SF,,normal,fixed,PostGIS 2.0 getsrid ExecuteSQL,