我尝试在命令行界面中使用以下命令使用ogr2ogr从postgresql数据库中导出shapefile:
ogr2ogr -f "ESRI Shapefile" "C://ash//ash.shp" PG:"host=localhost user=postgres dbname=parcel password=admin -sql "SELECT * FROM'public'.'parcel' WHERE 'parcel'.'ParcelNoEng'=116"
错误显示:
ERROR 1: PQconnectdb failed.
missing "=" after "-sql" in connection info string
FAILURE:
Unable to open datasource `PG:host=localhost user=postgres dbname=parcel password=admin -sql SELECT' with the following drivers.