<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=500074118-10042007>Hi
all,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=500074118-10042007>I think there is
something wrong with the PG driver or ogr2ogr when appending or overwriting an
existing table.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=500074118-10042007>I can create a PG
table from a shape file just fine, to any schema. However, when I try to append
or overwrite to the table, it will only work if the schema is the default schema
in the search path.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=500074118-10042007>My command is as
below (names changed to protect innocent). The table was added using the same
command (minus the append stuff) to the public schema. If I remove the schema in
both the first conversion and the append, it will work, with the table going
into the default schema.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007>-------------</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=500074118-10042007>C:\>ogr2ogr
-append -update -f "PostgreSQL" PG:"connection string stuff" shape.shp -lco
SCHEMA=public</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=500074118-10042007><BR>ERROR 1: CREATE
TABLE public."shape" ( OGC_FID SERIAL, CONSTRAINT "shape_pk" PRIMARY KEY
(OGC_FID) )<BR>ERROR: relation "shape" already exists</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=500074118-10042007>ERROR 1: Terminating
translation prematurely after failed<BR>translation of layer
shape</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007>--------------</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=500074118-10042007>Is there a quick fix
to this? I looked briefly at the code, but looks like it would require some
digging in the PG driver.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=500074118-10042007>Richard</SPAN></FONT></DIV></BODY></HTML>