Ich versuche, eine Tabelle planet_osm_polygonvon einer Datenbank osmin eine andere zu kopieren test. Ich su postgresund führte die pg_dump.
Problem: Ich erhalte jedoch den Fehler could not change directory to "/root"und die Password:Eingabeaufforderung wurde zweimal angezeigt! Gibt es eine Möglichkeit, das auszuführen, pg_dumpwenn Sie als angemeldet sind root?
root@lalaland:~# su postgres
postgres@lalaland:/root$ pg_dump -h localhost "osm" --table "public.planet_osm_polygon" |
psql -h localhost "test" --table "staging.planet_osm_polygon"
could not change directory to "/root"
could not change directory to "/root"
Password: Password:
AKTUALISIEREN
Problem Nr. 2: Es scheint, dass die Tabelle in das publicSchema kopiert wird , obwohl ich das Flag übergeben habe --table="staging.planet_osm_polygon". Warum wird es nicht in ein Schema kopiert staging?
pg_dump, ruft das tatsächlich an psql? postgresql.org/docs/9.1/static/app-pgdump.html
psql -h localhost "test" --table "staging.planet_osm_polygon"
publicSchema kopiert
psql, der die Ursache von Problem # 2 sein kann