I have a view, named
PointsForGpxExport, that contains points I want to export to a GPX file. The
ogr2ogr command I'm trying to use for the export is included below. When I run the command, a GPX file is created. The file is a shell of a GPX file - headers and root element but none of the data from the view. An error is reported.
The error reported is
ERROR 1: ERROR: relation "pointsforgpxexport" does not exist LINE 1: DECLARE executeSQLCursor CURSOR for SELECT * FROM PointsForG...
ogr2ogr-f GPX c:\temp\points.gpx PG:"host=localhost port=5432 dbname=SpatialPlayground schemas=public user=postgres password=password" -sql "SELECT * FROM PointsForGpxExport"
When I run
SELECT * FROM PointsForGpxExport inside the pgAdmin tool, an error occurs
ERROR: relation "pointsforgpxexport" does not exist I resolved this error by including the schema name in the query as in
SELECT * FROM "public"."PointsForGpxExport"; This error is identical to the error I'm getting when I run
ogr2ogr and I thought it would be resolved by using
schemas=public in the connection string.
What am I doing wrong and how do I fix this?
PostgreSQL 9.3, PostGIS 2.1.6, GDAL 1.11.2 released 2015/02/10