Christian,<br><br>Using the -overwrite option and -lco SCHEMA will not work in ogr2ogr. <br>Refer to <a href="http://www.gdal.org/ogr/drv_pg.html">http://www.gdal.org/ogr/drv_pg.html</a> for details.<br><br><div class="gmail_quote">
On Thu, Aug 18, 2011 at 5:07 PM, Chrishelring <span dir="ltr"><<a href="mailto:christianhelring@gmail.com">christianhelring@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi list,<br>
<br>
I´m trying to upload a Mapinfo table (grundejerforeninger.tab) to our<br>
postgis db using ogr2ogr. The tabel should be located in the schema<br>
"rk_test" and could exist (e.g. the table should be replaced with the new<br>
one). I´m using ogr2ogr with the following:<br>
<br>
ogr2ogr.exe -overwrite -f "PostgreSQL" -s_srs EPSG:25832 -lco PRECISION=NO<br>
-lco DIM=2 -lco LAUNDER=YES -lco SCHEMA=rk_test -nlt GEOMETRY -t_srs<br>
EPSG:25832 "PG:user=k175_test password=k175_test dbname=k175_test<br>
host=webgis.roedovre.local port=5432" grundejerforeninger.tab<br>
<br>
Resulting in,<br>
<br>
ERROR 1: CREATE TABLE "rk_test"."grundejerforeninger" ( OGC_FID SERIAL,<br>
CONSTRAI<br>
NT "grundejerforeninger_pk" PRIMARY KEY (OGC_FID) )<br>
ERROR: relation "grundejerforeninger" already exists<br>
<br>
ERROR 1: Terminating translation prematurely after failed<br>
translation of layer grundejerforeninger (use -skipfailures to skip errors)<br>
<br>
What am I doing wrong?<br>
<br>
Christian<br>
<font color="#888888"><br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Mapinfo-postgis-db-using-ogr2ogr-failing-to-overwrite-tp6699039p6699039.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Mapinfo-postgis-db-using-ogr2ogr-failing-to-overwrite-tp6699039p6699039.html</a><br>
Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>