Re: [pgsql-de-allgemein] AW: [pgsql-de-al lgemein] Wiederherstellen nicht möglich

Gunnar Oehmichen <[email protected]>
Newsgroups gmane.comp.db.postgresql.german
Message-ID <[email protected]>
Hallo Andreas,

 >> postgres=# SELECT PostGIS_version();
 >> ERROR:  function postgis_version() does not exist
 >> LINE 1: SELECT PostGIS_version();
 >>                  ^
 >> HINT:  No function matches the given name and argument types. You might
 >> need to add explicit type casts.
 >
 > Vermutlich hast Du in der DB postgres die PostGIS-Erweiterung nicht 
installiert - damit gibt es die Funktion halt nicht.
 >

Danke, die default administrative connection database hat jetzt postgis, 
deswegen auch:

postgres=# SELECT postgis_version();
             postgis_version
---------------------------------------
  2.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
(1 row)

"MI" hat jetzt auch die Extensions, trotzdem kann ich die Datenbank 
nicht wiederherstellen:

/usr/bin/pg_restore --host localhost --port 5432 --username "postgres" 
--dbname "MI" --no-password  --verbose 
"/home/gunnaroeh/Dokumente/Laenderdaten/Database/LaenderStand_02-20.backup"
pg_restore: connecting to database for restore
pg_restore: creating TABLE mzb
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 184; 1259 51662 TABLE 
mzb postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  relation 
"mzb" already exists
     Command was: CREATE TABLE mzb (
     samplenr integer NOT NULL,
     land character varying(50),
     samplsite_id integer,
     date date,
  ...
pg_restore: creating TABLE samplsites_mzb
pg_restore: [archiver (db)] Error from TOC entry 200; 1259 51728 TABLE 
samplsites_mzb postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  relation 
"samplsites_mzb" already exists
     Command was: CREATE TABLE samplsites_mzb (
     land character varying(50),
     samplsite_id integer NOT NULL,
     samplsite character var...
pg_restore: creating TABLE samplsites_phch
pg_restore: [archiver (db)] Error from TOC entry 201; 1259 51734 TABLE 
samplsites_phch postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  relation 
"samplsites_phch" already exists
     Command was: CREATE TABLE samplsites_phch (
     land character varying(50),
     samplsite_id character varying(50),
     samplsite charact...
pg_restore: restoring data for table "mzb"
pg_restore: restoring data for table "samplsites_mzb"
pg_restore: [archiver (db)] Error from TOC entry 3147; 0 51728 TABLE 
DATA samplsites_mzb postgres
pg_restore: [archiver (db)] COPY failed for table "samplsites_mzb": 
ERROR:  duplicate key value violates unique constraint "id"
DETAIL:  Key (samplsite_id)=(500331) already exists.
CONTEXT:  COPY samplsites_mzb, line 1: "MecklenburgVorpommern	500331 
NEBEL_42	u .Guestrow	33313660	5964882	3708551.19	5968631.89	53.81	12.17..."
pg_restore: restoring data for table "samplsites_phch"
pg_restore: creating CONSTRAINT id
pg_restore: [archiver (db)] Error from TOC entry 3145; 2606 59403 
CONSTRAINT id postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  multiple 
primary keys for table "samplsites_mzb" are not allowed
     Command was: ALTER TABLE ONLY samplsites_mzb
     ADD CONSTRAINT id PRIMARY KEY (samplsite_id);



pg_restore: setting owner and privileges for TABLE mzb
pg_restore: setting owner and privileges for TABLE samplsites_mzb
pg_restore: setting owner and privileges for TABLE samplsites_phch
pg_restore: setting owner and privileges for TABLE DATA mzb
pg_restore: setting owner and privileges for TABLE DATA samplsites_mzb
pg_restore: setting owner and privileges for TABLE DATA samplsites_phch
pg_restore: setting owner and privileges for CONSTRAINT id
WARNING: errors ignored on restore: 5

Prozess beendete mit Exitcode 1.

Irgendwelche Ideen?

Herzlichen Dank,

Gunnar Oehmichen


-- 
Sent via pgsql-de-allgemein mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-de-allgemein
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.