pg_dump:cannot find function for trigger

From: Claudio Grillo <cjg(at)certi(dot)ufsc(dot)br>
To: PostgresSQL mailing list <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump:cannot find function for trigger
Date: 2000-11-23 12:43:23
Message-ID: 3A1D10EB.437006BC@certi.ufsc.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello:

After creating the tables tb_bombas and tb_abastecimentos
as follows

\connect f
drop table tb_bombas;
CREATE TABLE "tb_bombas" (
"id_bomba" int2 PRIMARY KEY,
"tipo_bomba" char,
"estado_bomba" int2,
"data_atualizacao" datetime);
CREATE TABLE "tb_abastecimentos" (
"id_bomba" int2 references tb_bombas(id_bomba),
"data_abastecimento" datetime NOT NULL,
"volume" int4,
"valor" int4,
"estado" character,
constraint pk_abastecimentos primary
key(id_bomba,data_abastecimento)
);

and using pg_dump , I got the following error message :

-- last builtin oid is 17216
-- reading user-defined types
-- reading user-defined functions
-- reading user-defined aggregates
-- reading user-defined operators
-- reading user-defined tables
-- finding Triggers for relation: 'tb_bombas'
getTables(): relation 'tb_bombas': cannot find function with oid 1654
for trigger RI_ConstraintTrigger_28974

But I can find de procedure with oid 1654 in the pg_proc, and the
reference to this function in pg_trigger:

pg_trigger

tgrelid|tgname
|tgfoid|tgtype|tgenabled|tgisconstraint|tgconstrname|tgconstrrelid|tgdeferrable|tginitdeferred|tgnargs|tgattr|tgargs

-------+--------------------------+------+------+---------+--------------+------------+-------------+------------+--------------+-------+------+--------------------------------------------------------------------------------------

28928|RI_ConstraintTrigger_28974| 1654| 9|t |t
|<unnamed> | 28956|f |f | 6|
|<unnamed>\000tb_abastecimentos\000tb_bombas\000UNSPECIFIED\000id_bomba\000id_bomba\000

(1 row)

pg_proc
proname
|proowner|prolang|proisinh|proistrusted|proiscachable|pronargs|proretset|prorettype|proargtypes|probyte_pct|properbyte_cpu|propercall_cpu|prooutin_ratio|prosrc

|probin
--------------------+--------+-------+--------+------------+-------------+--------+---------+----------+-----------+-----------+--------------+--------------+--------------+--------------------+------

RI_FKey_noaction_del| 40| 11|f |t |f
| 0|f | 0| | 100|
0| 0| 100|RI_FKey_noaction_del|-
(1 row)

I can't dump my database because the error makes pg_dump to exit.
So, i will be grateful for any help.

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 2000-11-23 14:31:42 Search engine on http://www.postgresql.org ...
Previous Message Enrico Comini 2000-11-23 12:21:14 MS-ACCESS -> PGSQL