Skip site navigation (1) Skip section navigation (2)

Plpgsql restore command

From: sylvinhio sly <sylvinhio(at)hotmail(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Plpgsql restore command
Date: 2009-09-09 17:26:52
Message-ID: SNT113-W5683F27A5456BA5AE62180B6E90@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-novice
Hello,

I found some subjects talking of my poblem but no real answer...

I'm trying to restore a database previously saved with the pg_dump command.
When trying to execute the pg_restore comand, I got the following error :

pg_restore: connecting to database for restore
pg_restore: dropping FK CONSTRAINT fk_xxxxxx
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3063; 2606 32970 FK CONSTRAINT
fk_variable_variables_variable 

So it can't drop foreigne key constraints...
Later, I've got the following error:

pg_restore: dropping TABLE valeur_texte
pg_restore: [archiver (db)] Error from TOC entry 2128; 1259 31968 TABLE valeur_t
exte atih
pg_restore: [archiver (db)] could not execute query: ERROR:  cannot drop table v
aleur_texte because other objects depend on it
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
    Command was: DROP TABLE public.valeur_texte;
pg_restore: dropping TABLE valeur_reelle


It seems that my table can't be dropped because objects depending on it still exist... maybe the constraints that have not been dropped.
My problem is that if my table is not dropped, the data are still present, and the data of my dump will be inserted in it again...

The problem is that I don't know what happens because the dump and restore are made by postgre...


Can someone explain me what the problem is ?

Thanks a lot for your help

_________________________________________________________________
Messenger débarque dans Hotmail ! Essayez-le !
http://www.windowslive.fr/hotmail/web-messenger/

pgsql-novice by date

Next:From: Sergey SamokhinDate: 2009-09-09 19:18:41
Subject: Re: Can't understand how a query from the documentation works
Previous:From: Salva TriadoDate: 2009-09-09 15:39:55
Subject: Download postgresql 7.4.1 windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group