I am exporting data from PostGIS to gml using python script with ogr2ogr. But the output generates unwanted new field "fid" that contains the following string: "sql_statement.0" , "sql_statement.1", ... and so on. Is there a way to prevent this? I already have a field with unique feature identifiers.
cmd = ogr2ogr + " -f \"GML\" " + filename + " PG:" + db_connect + " -sql " + query
AS fid
: ogr2ogr wants that identifier for GML, and it seems the driver will add that field in any case.