<div id="RTEContent"><b><i>Dear Emily Gouge and Michael Fuhr</i></b><b><i> ,</i></b><br>  <br>  Thank you very much for your advice. I have used the option you mentioned and it has worked very well.<br>  <br>   <ul> <li>the databse name is forestrydb</li><li>the schema name is forest</li><li>the existing PostGIS table name to which the old data is located is forest<br>   </li><li>the new shape file is forest3.shp</li> </ul>  the command used is<br>   <div id="RTEContent"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="Generator" content="Kate, the KDE Advanced Text Editor">  <pre style="color: rgb(192, 0, 0);">/usr/local/pgsql/bin/shp2pgsql -a forest3.shp forest.forest | /usr/local/pgsql/bin/psql forestrydb</pre>it works very well.<br> <br> Thank you again for your support.<br> <br> Kefyalew<br></div> <br><br><b><i>Emily Gouge <egouge@refractions.net></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255);
 margin-left: 5px; padding-left: 5px;"> Try using the -a option in the shp2pgsql.<br><br>So instead of<br>/usr/local/pgsql/bin/shp2pgsql  forest forest | /usr/local/pgsql/bin/psql -a forestrydb<br><br>try<br>/usr/local/pgsql/bin/shp2pgsql -a forest forest | /usr/local/pgsql/bin/psql forestrydb<br><br>Also you can write the output of the shp2pgsql comment to a file instead of the database and try <br>looking at the beginning of the file.  If you use the -a option there should be no create table <br>statement at the beginning of the file, without the -a option there should be a create table statement.<br><br>Emily<br><br>Kefyalew Sahle wrote:<br><br>>  Hello,<br>>    <br>> I have got problem in adding new data in a table that already exist in PostGIS. <br>> I used the following command   <br>> /usr/local/pgsql/bin/shp2pgsql  forest forest | /usr/local/pgsql/bin/psql -a forestrydb <br>> <br>> I received the following message <br>> ERROR:  relation "forest"
 already exists ............... <br>> ERROR:  current transaction is aborted, commands ignored until end of transaction block <br>> When running without any options. The task is aborted. The following is the massage displayed after running the shp2pgsql command:<br>>    Shapefile type: Polygon<br>>  Postgis type: MULTIPOLYGON[2]<br>>  BEGIN<br>>  NOTICE: CREATE TABLE will create implicit sequence "forest_gid_seq1" for serial column "forest.gid"<br>>  ERROR:  relation "forest" already exists<br>>  ERROR:  current transaction is aborted, commands ignored until end of transaction block<br>>  ERROR:  current transaction is aborted, commands ignored until end of transaction block<br>>  ROLLBACK<br>>    <br>> Would you please provide me some information how I can append in my existing PostGIS <br>> database new data that is available in shape format?<br>> Thanks in advance  <br>> <br>> Kef<br>>   <br>> <br>>   <br>>
 ---------------------------------<br>> Yahoo! Photos<br>>  Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.<br>> <br>> <br>> ------------------------------------------------------------------------<br>> <br>> _______________________________________________<br>> postgis-users mailing list<br>> postgis-users@postgis.refractions.net<br>> http://postgis.refractions.net/mailman/listinfo/postgis-users<br><br>_______________________________________________<br>postgis-users mailing list<br>postgis-users@postgis.refractions.net<br>http://postgis.refractions.net/mailman/listinfo/postgis-users<br></blockquote><br></div><p>
                <hr size=1>Yahoo! Photos<br> 
Ring in the New Year with <a href="http://us.rd.yahoo.com/mail_us/taglines/photos/*http://pa.yahoo.com/*http://us.rd.yahoo.com/mail_us/taglines/photos/evt=38087/*http://pg.photos.yahoo.com/ph//page?.file=calendar_splash.html&.dir=">Photo Calendars</a>. Add photos, events, holidays, whatever.