openstreetmap / trac-tickets

Archived Trac Tickets
1 stars 1 forks source link

osmosis can't append osm data into database #5477

Open openstreetmap-trac opened 3 years ago

openstreetmap-trac commented 3 years ago

Reporter: fazlerabbi37[at]gmail.com [Submitted to the original trac issue database at 4.26pm, Tuesday, 7th November 2017]

at first I upload data into database using this command- osmosis --read-pbf previous.osm.pbf --write-apidb host="localhost" database="openstreetmap" user="postgres" password="postgres" validateSchemaVersion="no" and its working fine. Next I produce a diff.osc.gz using following command- osmosis --read-pbf latest.osm.pbf --read-apidb host="localhost" database="openstreetmap" user="postgres" password="postgres" validateSchemaVersion=no --derive-change --write-xml-change file=diff.osc.gz Then I use the following command to append data into database- osmosis --read-xml-change diff.osc.gz --write-pgsql-change user="postgres" database="openstreetmap" password="postgres" validateSchemaVersion="no" It shows me following error: SEVERE: Thread for task 1-read-xml-change failed org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT id, name FROM users WHERE id = ?]; nested exception is org.postgresql.util.PSQLException: ERROR: column "name" does not exist

Am I doing something wrong? what is the right procedure?