PostgreSQL La base de donnees la plus sophistiquee au monde.

Forums PostgreSQL.fr

Le forum officiel de la communauté francophone de PostgreSQL

Vous n'êtes pas identifié(e).

#1 Re : C et C++ » ERROR: operator does not exist: character varying = integer » 13/02/2012 23:05:10

voulez vous m'informer SVP s'il y a un moyen de modifier cette command de sorte que soit accepter par tout mes serveur le 8.1 et 9.0
int PSQL_GetCertificat(char no_serie[], char *typecert)
{
    int status;
    char command[400];
    PGresult *result; 
    int nbTuples;
   
    Fmt(command,"%s<%s%s","SELECT typecertificat FROM mac WHERE infodht_no_serie=",no_serie);
    result = PQexec(db, command);
    status = VerifyCmdWithData(result);

#2 C et C++ » ERROR: operator does not exist: character varying = integer » 13/02/2012 21:48:42

kadbra78
Réponses : 5

Lorsque j'exécute cette line sur mon serveur de base de données originale version 8.1
Je n'ai aucun message d'erreurs

Fmt(command,"%s<%s%s","SELECT typecertificat FROM mac WHERE infodht_no_serie=",no_serie);

Par contre lorsque cette commande est exécuter sur mon nouveau serveur version 9.0 sur lequel j'ai restauré ma base de données original
J’ai eu ce message d'erreur

ERROR:  operator does not exist: character varying = integer
LINE 1: ...ECT typecertificat FROM mac WHERE infodht_no_serie =55137954
                                                              ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
********** Error **********
ERROR: operator does not exist: character varying = integer
SQL state: 42883
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Character: 55

Y a t-il un moyen de régler ce problème sans que je modifie ma requête ?

#3 Re : Général » error after restoring a db » 13/02/2012 21:26:55

@gleu
Oui je l'ai recommencé en créant une base de donne vierge mais  je continue à avoir les mêmes erreurs

#4 Re : Général » error after restoring a db » 13/02/2012 21:24:13

@rjuju
version pg_dump=9.0.3
version pg_dumpall=9.0.3
version pg_restore=9.0.3

étant donnée que j’utilise l'utilitaire pg admin pour faire le backup et le restore je ne sais pas si il fait appel à pg_dump ou pgdumpall lors de l'opération backup

#5 Re : Général » error after restoring a db » 13/02/2012 20:51:54

pour faire le pg_dump et pg_restore j'utilise l'utilitaire de pgAdminIII version 1.12.3
backup pour faire le dump du serveur 8.1
et restore pour restorer sur le serveur 9.0

#6 Re : Général » error after restoring a db » 13/02/2012 20:27:57

Merci pour votre réponse
1)    En faisant SELECT * FROM pg_trigger WHERE oid IN (3212528,3212529,3212530) sur la base original
J’ai eu ceci comme réponse (désolé pour le format pas trop lisible j'aurai aimé avoir la possibilité de joindre un fichier):
50266;"RI_ConstraintTrigger_3212528";1644;21;t;t;"infodht_invhwrev_fk";50260;f;f;6;"";"infodht_invhwrev_fk\000infodht\000invhwrev\000UNSPECIFIED\000invhwrev_revpcb\000revpcb\000"
50260;"RI_ConstraintTrigger_3212529";1654;9;t;t;"infodht_invhwrev_fk";50266;f;f;6;"";"infodht_invhwrev_fk\000infodht\000invhwrev\000UNSPECIFIED\000invhwrev_revpcb\000revpcb\000"
50260;"RI_ConstraintTrigger_3212530";1655;17;t;t;"infodht_invhwrev_fk";50266;f;f;6;"";"infodht_invhwrev_fk\000infodht\000invhwrev\000UNSPECIFIED\000invhwrev_revpcb\000revpcb\000"
et en faisant :SELECT * FROM pg_constraint WHERE conname = 'infodht_invhwtype_fk' toujour sur la base original je n'ai rien eu comme data output

2)    par contre  sur la  base restaurer lorsque j'ai fais  SELECT * FROM pg_trigger WHERE oid IN (3212528,3212529,3212530)
Je n'ai rien eu en sortie
et en faisant :SELECT * FROM pg_constraint WHERE conname = 'infodht_invhwtype_fk' j'ai eu ceci comme output
"infodht_invhwtype_fk";2200;"f";f;f;17195894;0;20774602;17195916;"a";"a";"u";t;0;"{2}";"{1}";"{98}";"{98}";"{98}";"";"";""

3)    Aussi en comparant les deux table pg_constreaint et pg_trigger sur mon ancien serveur dont la PG_VERSION=8.1 et le nouveau dont la PG_VERSION=9.0 j'ai noté qu'ils n'ont pas le même nombre de colonnes et même le data type peux déférer pour certain colonnes de même tableau d'un serveur à autre 
Ainsi je me demande s'il y a un moyen de remédier à cela ?

#7 Re : Général » error after restoring a db » 13/02/2012 17:01:20

Merci pour votre réponse désolée pour l'anglais j'ai pensé qu'on pourrait écrire dans les deux langues sur ce forum
Concernant mon problème je ne comprends pas comment ces objets pourrait exister car lorsque le restore était fait;  je l'ai fais sur un nouveau serveur qui ne contenait pas aucune base de données 
Donc je suis sure que ma base de données était vide avant que je fasse le restore
L’autre point que je ne comprends pas on dirait que ces erreurs ne sont pas majeures ou du moins ils n’ont pas d'impact car en testant ma  db elle semble bien fonctionner

#8 PgAdmin3 » error after restoring a db » 13/02/2012 16:37:14

kadbra78
Réponses : 1

Hi,
I got these errors message when i have made a restore for my date base from our production server to new one 
I'm wondering if it is a major errors ? Is there a way to fix these errors ?
Please note that when I test the restored db all seems ok I get only one error with one table
please advice
here is the errors that i got when i made the restore
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1865; 2620 3212527 TRIGGER RI_ConstraintTrigger_3212527 rd
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infodht_invhwtype_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER infodht_invhwtype_fk
    AFTER UPDATE ON invhwtype
    FROM infodht
    NOT DEFERRABLE INITIALLY I...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212528
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212529
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212530
pg_restore: [archiver (db)] Error from TOC entry 1871; 2620 3212530 TRIGGER RI_ConstraintTrigger_3212530 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infodht_invhwrev_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER infodht_invhwrev_fk
    AFTER UPDATE ON invhwrev
    FROM infodht
    NOT DEFERRABLE INITIALLY IMM...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212531
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212532
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212533
pg_restore: [archiver (db)] Error from TOC entry 1877; 2620 3212533 TRIGGER RI_ConstraintTrigger_3212533 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "mac_infodht_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER mac_infodht_fk
    AFTER UPDATE ON mac
    FROM infodht
    NOT DEFERRABLE INITIALLY IMMEDIATE
   ...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212534
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212535
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212536
pg_restore: [archiver (db)] Error from TOC entry 1899; 2620 3212536 TRIGGER RI_ConstraintTrigger_3212536 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infotest_infodht_fk" for relation "infotest" already exists
    Command was: CREATE CONSTRAINT TRIGGER infotest_infodht_fk
    AFTER UPDATE ON infodht
    FROM infotest
    NOT DEFERRABLE INITIALLY IMM...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212537
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212538
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212539
pg_restore: [archiver (db)] Error from TOC entry 1901; 2620 3212539 TRIGGER RI_ConstraintTrigger_3212539 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscaloffsets_infodht_fk" for relation "dscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscaloffsets_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscaloffsets
    NOT DEFERRABLE INITI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212540
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212541
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212542
pg_restore: [archiver (db)] Error from TOC entry 1938; 2620 3212542 TRIGGER RI_ConstraintTrigger_3212542 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscaloffsets_infotest_fk" for relation "dscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscaloffsets_infotest_fk
    AFTER UPDATE ON infotest
    FROM dscaloffsets
    NOT DEFERRABLE INI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212543
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212544
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212545
pg_restore: [archiver (db)] Error from TOC entry 1903; 2620 3212545 TRIGGER RI_ConstraintTrigger_3212545 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_infodht_fk" for relation "dscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscalpower
    NOT DEFERRABLE INITIALLY...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212546
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212547
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212548
pg_restore: [archiver (db)] Error from TOC entry 1940; 2620 3212548 TRIGGER RI_ConstraintTrigger_3212548 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_infotest_fk" for relation "dscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_infotest_fk
    AFTER UPDATE ON infotest
    FROM dscalpower
    NOT DEFERRABLE INITIAL...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212549
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212550
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212551
pg_restore: [archiver (db)] Error from TOC entry 1905; 2620 3212551 TRIGGER RI_ConstraintTrigger_3212551 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscaloffsets_infodht_fk" for relation "uscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscaloffsets_infodht_fk
    AFTER UPDATE ON infodht
    FROM uscaloffsets
    NOT DEFERRABLE INITI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212552
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212553
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212554
pg_restore: [archiver (db)] Error from TOC entry 1942; 2620 3212554 TRIGGER RI_ConstraintTrigger_3212554 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscaloffsets_infotest_fk" for relation "uscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscaloffsets_infotest_fk
    AFTER UPDATE ON infotest
    FROM uscaloffsets
    NOT DEFERRABLE INI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212555
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212556
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212557
pg_restore: [archiver (db)] Error from TOC entry 1907; 2620 3212557 TRIGGER RI_ConstraintTrigger_3212557 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscalpower_infodht_fk" for relation "uscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscalpower_infodht_fk
    AFTER UPDATE ON infodht
    FROM uscalpower
    NOT DEFERRABLE INITIALLY...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212558
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212559
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212560
pg_restore: [archiver (db)] Error from TOC entry 1944; 2620 3212560 TRIGGER RI_ConstraintTrigger_3212560 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscalpower_infotest_fk" for relation "uscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscalpower_infotest_fk
    AFTER UPDATE ON infotest
    FROM uscalpower
    NOT DEFERRABLE INITIAL...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212561
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212562
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212563
pg_restore: [archiver (db)] Error from TOC entry 1909; 2620 3212563 TRIGGER RI_ConstraintTrigger_3212563 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_02_infodht_fk" for relation "dscalpower_02" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_02_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscalpower_02
    NOT DEFERRABLE INI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212564
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212565
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212566
pg_restore: [archiver (db)] Error from TOC entry 1946; 2620 3212566 TRIGGER RI_ConstraintTrigger_3212566 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_02_infotest_fk" for relation "dscalpower_02" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_02_infotest_fk
    AFTER UPDATE ON infotest
    FROM dscalpower_02
    NOT DEFERRABLE I...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212567
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212568
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212569
pg_restore: [archiver (db)] Error from TOC entry 1867; 2620 3212569 TRIGGER RI_ConstraintTrigger_3212569 rd
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infodht_invhwtype_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER infodht_invhwtype_fk
    AFTER UPDATE ON invhwtype
    FROM infodht
    NOT DEFERRABLE INITIALLY I...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212570
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212571
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212572
pg_restore: [archiver (db)] Error from TOC entry 1873; 2620 3212572 TRIGGER RI_ConstraintTrigger_3212572 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infodht_invhwrev_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER infodht_invhwrev_fk
    AFTER UPDATE ON invhwrev
    FROM infodht
    NOT DEFERRABLE INITIALLY IMM...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212573
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212574
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212575
pg_restore: [archiver (db)] Error from TOC entry 1879; 2620 3212575 TRIGGER RI_ConstraintTrigger_3212575 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "mac_infodht_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER mac_infodht_fk
    AFTER UPDATE ON mac
    FROM infodht
    NOT DEFERRABLE INITIALLY IMMEDIATE
   ...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212576
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212577
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212578
pg_restore: [archiver (db)] Error from TOC entry 1914; 2620 3212578 TRIGGER RI_ConstraintTrigger_3212578 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infotest_infodht_fk" for relation "infotest" already exists
    Command was: CREATE CONSTRAINT TRIGGER infotest_infodht_fk
    AFTER UPDATE ON infodht
    FROM infotest
    NOT DEFERRABLE INITIALLY IMM...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212579
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212580
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212581
pg_restore: [archiver (db)] Error from TOC entry 1916; 2620 3212581 TRIGGER RI_ConstraintTrigger_3212581 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscaloffsets_infodht_fk" for relation "dscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscaloffsets_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscaloffsets
    NOT DEFERRABLE INITI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212582
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212583
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212584
pg_restore: [archiver (db)] Error from TOC entry 1949; 2620 3212584 TRIGGER RI_ConstraintTrigger_3212584 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscaloffsets_infotest_fk" for relation "dscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscaloffsets_infotest_fk
    AFTER UPDATE ON infotest
    FROM dscaloffsets
    NOT DEFERRABLE INI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212585
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212586
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212587
pg_restore: [archiver (db)] Error from TOC entry 1918; 2620 3212587 TRIGGER RI_ConstraintTrigger_3212587 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_infodht_fk" for relation "dscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscalpower
    NOT DEFERRABLE INITIALLY...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212588
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212589
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212590
pg_restore: [archiver (db)] Error from TOC entry 1951; 2620 3212590 TRIGGER RI_ConstraintTrigger_3212590 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_infotest_fk" for relation "dscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_infotest_fk
    AFTER UPDATE ON infotest
    FROM dscalpower
    NOT DEFERRABLE INITIAL...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212591
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212592
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212593
pg_restore: [archiver (db)] Error from TOC entry 1920; 2620 3212593 TRIGGER RI_ConstraintTrigger_3212593 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscaloffsets_infodht_fk" for relation "uscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscaloffsets_infodht_fk
    AFTER UPDATE ON infodht
    FROM uscaloffsets
    NOT DEFERRABLE INITI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212594
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212595
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212596
pg_restore: [archiver (db)] Error from TOC entry 1953; 2620 3212596 TRIGGER RI_ConstraintTrigger_3212596 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscaloffsets_infotest_fk" for relation "uscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscaloffsets_infotest_fk
    AFTER UPDATE ON infotest
    FROM uscaloffsets
    NOT DEFERRABLE INI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212597
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212598
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212599
pg_restore: [archiver (db)] Error from TOC entry 1922; 2620 3212599 TRIGGER RI_ConstraintTrigger_3212599 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscalpower_infodht_fk" for relation "uscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscalpower_infodht_fk
    AFTER UPDATE ON infodht
    FROM uscalpower
    NOT DEFERRABLE INITIALLY...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212600
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212601
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212602
pg_restore: [archiver (db)] Error from TOC entry 1955; 2620 3212602 TRIGGER RI_ConstraintTrigger_3212602 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscalpower_infotest_fk" for relation "uscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscalpower_infotest_fk
    AFTER UPDATE ON infotest
    FROM uscalpower
    NOT DEFERRABLE INITIAL...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212603
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212604
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212605
pg_restore: [archiver (db)] Error from TOC entry 1924; 2620 3212605 TRIGGER RI_ConstraintTrigger_3212605 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_02_infodht_fk" for relation "dscalpower_02" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_02_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscalpower_02

#9 Général » error after restoring a db » 13/02/2012 16:35:12

kadbra78
Réponses : 11

Hi,
I got these errors message when i have made a restore for my date base from our production server to new one 
1) I'm wondering if it is a major errors ?
2) Is there a way to fix these errors ?
Please note that when I test the restored db all seems ok I get only one error with one table
please advice

here is the errors that i got when i made the restore
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1865; 2620 3212527 TRIGGER RI_ConstraintTrigger_3212527 rd
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infodht_invhwtype_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER infodht_invhwtype_fk
    AFTER UPDATE ON invhwtype
    FROM infodht
    NOT DEFERRABLE INITIALLY I...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212528
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212529
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212530
pg_restore: [archiver (db)] Error from TOC entry 1871; 2620 3212530 TRIGGER RI_ConstraintTrigger_3212530 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infodht_invhwrev_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER infodht_invhwrev_fk
    AFTER UPDATE ON invhwrev
    FROM infodht
    NOT DEFERRABLE INITIALLY IMM...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212531
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212532
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212533
pg_restore: [archiver (db)] Error from TOC entry 1877; 2620 3212533 TRIGGER RI_ConstraintTrigger_3212533 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "mac_infodht_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER mac_infodht_fk
    AFTER UPDATE ON mac
    FROM infodht
    NOT DEFERRABLE INITIALLY IMMEDIATE
   ...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212534
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212535
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212536
pg_restore: [archiver (db)] Error from TOC entry 1899; 2620 3212536 TRIGGER RI_ConstraintTrigger_3212536 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infotest_infodht_fk" for relation "infotest" already exists
    Command was: CREATE CONSTRAINT TRIGGER infotest_infodht_fk
    AFTER UPDATE ON infodht
    FROM infotest
    NOT DEFERRABLE INITIALLY IMM...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212537
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212538
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212539
pg_restore: [archiver (db)] Error from TOC entry 1901; 2620 3212539 TRIGGER RI_ConstraintTrigger_3212539 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscaloffsets_infodht_fk" for relation "dscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscaloffsets_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscaloffsets
    NOT DEFERRABLE INITI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212540
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212541
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212542
pg_restore: [archiver (db)] Error from TOC entry 1938; 2620 3212542 TRIGGER RI_ConstraintTrigger_3212542 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscaloffsets_infotest_fk" for relation "dscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscaloffsets_infotest_fk
    AFTER UPDATE ON infotest
    FROM dscaloffsets
    NOT DEFERRABLE INI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212543
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212544
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212545
pg_restore: [archiver (db)] Error from TOC entry 1903; 2620 3212545 TRIGGER RI_ConstraintTrigger_3212545 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_infodht_fk" for relation "dscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscalpower
    NOT DEFERRABLE INITIALLY...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212546
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212547
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212548
pg_restore: [archiver (db)] Error from TOC entry 1940; 2620 3212548 TRIGGER RI_ConstraintTrigger_3212548 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_infotest_fk" for relation "dscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_infotest_fk
    AFTER UPDATE ON infotest
    FROM dscalpower
    NOT DEFERRABLE INITIAL...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212549
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212550
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212551
pg_restore: [archiver (db)] Error from TOC entry 1905; 2620 3212551 TRIGGER RI_ConstraintTrigger_3212551 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscaloffsets_infodht_fk" for relation "uscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscaloffsets_infodht_fk
    AFTER UPDATE ON infodht
    FROM uscaloffsets
    NOT DEFERRABLE INITI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212552
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212553
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212554
pg_restore: [archiver (db)] Error from TOC entry 1942; 2620 3212554 TRIGGER RI_ConstraintTrigger_3212554 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscaloffsets_infotest_fk" for relation "uscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscaloffsets_infotest_fk
    AFTER UPDATE ON infotest
    FROM uscaloffsets
    NOT DEFERRABLE INI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212555
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212556
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212557
pg_restore: [archiver (db)] Error from TOC entry 1907; 2620 3212557 TRIGGER RI_ConstraintTrigger_3212557 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscalpower_infodht_fk" for relation "uscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscalpower_infodht_fk
    AFTER UPDATE ON infodht
    FROM uscalpower
    NOT DEFERRABLE INITIALLY...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212558
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212559
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212560
pg_restore: [archiver (db)] Error from TOC entry 1944; 2620 3212560 TRIGGER RI_ConstraintTrigger_3212560 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscalpower_infotest_fk" for relation "uscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscalpower_infotest_fk
    AFTER UPDATE ON infotest
    FROM uscalpower
    NOT DEFERRABLE INITIAL...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212561
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212562
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212563
pg_restore: [archiver (db)] Error from TOC entry 1909; 2620 3212563 TRIGGER RI_ConstraintTrigger_3212563 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_02_infodht_fk" for relation "dscalpower_02" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_02_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscalpower_02
    NOT DEFERRABLE INI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212564
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212565
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212566
pg_restore: [archiver (db)] Error from TOC entry 1946; 2620 3212566 TRIGGER RI_ConstraintTrigger_3212566 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_02_infotest_fk" for relation "dscalpower_02" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_02_infotest_fk
    AFTER UPDATE ON infotest
    FROM dscalpower_02
    NOT DEFERRABLE I...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212567
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212568
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212569
pg_restore: [archiver (db)] Error from TOC entry 1867; 2620 3212569 TRIGGER RI_ConstraintTrigger_3212569 rd
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infodht_invhwtype_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER infodht_invhwtype_fk
    AFTER UPDATE ON invhwtype
    FROM infodht
    NOT DEFERRABLE INITIALLY I...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212570
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212571
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212572
pg_restore: [archiver (db)] Error from TOC entry 1873; 2620 3212572 TRIGGER RI_ConstraintTrigger_3212572 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infodht_invhwrev_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER infodht_invhwrev_fk
    AFTER UPDATE ON invhwrev
    FROM infodht
    NOT DEFERRABLE INITIALLY IMM...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212573
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212574
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212575
pg_restore: [archiver (db)] Error from TOC entry 1879; 2620 3212575 TRIGGER RI_ConstraintTrigger_3212575 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "mac_infodht_fk" for relation "infodht" already exists
    Command was: CREATE CONSTRAINT TRIGGER mac_infodht_fk
    AFTER UPDATE ON mac
    FROM infodht
    NOT DEFERRABLE INITIALLY IMMEDIATE
   ...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212576
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212577
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212578
pg_restore: [archiver (db)] Error from TOC entry 1914; 2620 3212578 TRIGGER RI_ConstraintTrigger_3212578 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "infotest_infodht_fk" for relation "infotest" already exists
    Command was: CREATE CONSTRAINT TRIGGER infotest_infodht_fk
    AFTER UPDATE ON infodht
    FROM infotest
    NOT DEFERRABLE INITIALLY IMM...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212579
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212580
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212581
pg_restore: [archiver (db)] Error from TOC entry 1916; 2620 3212581 TRIGGER RI_ConstraintTrigger_3212581 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscaloffsets_infodht_fk" for relation "dscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscaloffsets_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscaloffsets
    NOT DEFERRABLE INITI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212582
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212583
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212584
pg_restore: [archiver (db)] Error from TOC entry 1949; 2620 3212584 TRIGGER RI_ConstraintTrigger_3212584 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscaloffsets_infotest_fk" for relation "dscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscaloffsets_infotest_fk
    AFTER UPDATE ON infotest
    FROM dscaloffsets
    NOT DEFERRABLE INI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212585
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212586
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212587
pg_restore: [archiver (db)] Error from TOC entry 1918; 2620 3212587 TRIGGER RI_ConstraintTrigger_3212587 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_infodht_fk" for relation "dscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscalpower
    NOT DEFERRABLE INITIALLY...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212588
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212589
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212590
pg_restore: [archiver (db)] Error from TOC entry 1951; 2620 3212590 TRIGGER RI_ConstraintTrigger_3212590 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_infotest_fk" for relation "dscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_infotest_fk
    AFTER UPDATE ON infotest
    FROM dscalpower
    NOT DEFERRABLE INITIAL...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212591
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212592
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212593
pg_restore: [archiver (db)] Error from TOC entry 1920; 2620 3212593 TRIGGER RI_ConstraintTrigger_3212593 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscaloffsets_infodht_fk" for relation "uscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscaloffsets_infodht_fk
    AFTER UPDATE ON infodht
    FROM uscaloffsets
    NOT DEFERRABLE INITI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212594
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212595
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212596
pg_restore: [archiver (db)] Error from TOC entry 1953; 2620 3212596 TRIGGER RI_ConstraintTrigger_3212596 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscaloffsets_infotest_fk" for relation "uscaloffsets" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscaloffsets_infotest_fk
    AFTER UPDATE ON infotest
    FROM uscaloffsets
    NOT DEFERRABLE INI...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212597
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212598
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212599
pg_restore: [archiver (db)] Error from TOC entry 1922; 2620 3212599 TRIGGER RI_ConstraintTrigger_3212599 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscalpower_infodht_fk" for relation "uscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscalpower_infodht_fk
    AFTER UPDATE ON infodht
    FROM uscalpower
    NOT DEFERRABLE INITIALLY...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212600
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212601
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212602
pg_restore: [archiver (db)] Error from TOC entry 1955; 2620 3212602 TRIGGER RI_ConstraintTrigger_3212602 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "uscalpower_infotest_fk" for relation "uscalpower" already exists
    Command was: CREATE CONSTRAINT TRIGGER uscalpower_infotest_fk
    AFTER UPDATE ON infotest
    FROM uscalpower
    NOT DEFERRABLE INITIAL...
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212603
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212604
pg_restore: creating TRIGGER RI_ConstraintTrigger_3212605
pg_restore: [archiver (db)] Error from TOC entry 1924; 2620 3212605 TRIGGER RI_ConstraintTrigger_3212605 alainle
pg_restore: [archiver (db)] could not execute query: ERROR:  constraint "dscalpower_02_infodht_fk" for relation "dscalpower_02" already exists
    Command was: CREATE CONSTRAINT TRIGGER dscalpower_02_infodht_fk
    AFTER UPDATE ON infodht
    FROM dscalpower_02

Pied de page des forums

Propulsé par FluxBB