pg_dump issue : Cannot drop a non-existent(?) trigger - Mailing list pgsql-hackers

From Devrim GUNDUZ
Subject pg_dump issue : Cannot drop a non-existent(?) trigger
Date
Msg-id Pine.LNX.4.61.0503251228240.11249@emo.org.tr
Whole thread Raw
Responses Re: pg_dump issue : Cannot drop a non-existent(?) trigger
List pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

I've Google'd for the situation below and could not find any solution.

We are using PostgreSQL 8.0.1, installed using PGDG RPMs on RHEL ES 3.0:

=======================================================================
prod=# SELECT version();                                                   version
- --------------------------------------------------------------------------------------------------------------
PostgreSQL8.0.1 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 
 
3.2.3 20030502 (Red Hat Linux 3.2.3-42)
=======================================================================

We wanted to take a full backup, so ran pg_dump,but got an error:

=======================================================================
$ pg_dump prod -U postgres > all.pgdump
pg_dump: invalid argument string (firma_moduller_firma_fkey1) for trigger 
"RI_ConstraintTrigger_39053" on table "t_firma_moduller"
=======================================================================

Looking at the details, we saw the trigger there:

=======================================================================
prod=# \d t_firma_moduller                                              Table 
"public.t_firma_moduller"      Column      |            Type             | 
Modifiers
-
------------------+-----------------------------+--------------------------------------------------------------------------
firma_no        | character varying(10)       | not null modul_adi        | character varying(20)       | not null
last_update_date| timestamp without time zone | last_update_user | character varying(45)       | kod              |
integer                    | not null default 
 
fn_get_seq_value('t_firma_moduller'::character varying)
Indexes:    "t_firma_moduller_pkey" PRIMARY KEY, btree (firma_no, modul_adi)    "t_firma_moduller_kodu_ukey" UNIQUE,
btree(kod)
 
Triggers:    "RI_ConstraintTrigger_39053" AFTER INSERT OR UPDATE ON 
t_firma_moduller FROM t_firmalar NOT DEFERRABLE INITIALLY IMMEDIATE FOR 
EACH ROW EXECUTE PROCEDURE 
"RI_FKey_check_ins"('firma_moduller_firma_fkey1', 't_firma_moduller', 
't_firmalar', 'UNSPECIFIED', 'firma_no', 'no')
Tablespace: "data_ts"
=======================================================================

However, pgadmin3 can't see that. That is more possible since we can't 
drop them:

prod=# DROP TRIGGER RI_ConstraintTrigger_39053 ON t_firma_moduller;
ERROR:  trigger "ri_constrainttrigger_39053" for table "t_firma_moduller" 
does not exist

Is this a bug or something? There should not be a trigger there.

Regards,
- --
Devrim GUNDUZ 
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.tdmsoft.com                         http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFCQ+17tl86P3SPfQ4RAhZKAKCTEzLTizwyt+Zomgv3ikiussyaSQCgtDdD
Q3Ua6lJChMT43p2x+bo0rPY=
=s4g2
-----END PGP SIGNATURE-----


pgsql-hackers by date:

Previous
From: Marko Kreen
Date:
Subject: Re: Functions + plpgsql + contrib/pgcrypto = ??
Next
From: Palle Girgensohn
Date:
Subject: Re: Patch for collation using ICU