pg_dump:cannot find function for trigger - Mailing list pgsql-general

From Claudio Grillo
Subject pg_dump:cannot find function for trigger
Date
Msg-id 3A1D10EB.437006BC@certi.ufsc.br
Whole thread Raw
Responses Re: pg_dump:cannot find function for trigger  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.




pgsql-general by date:

Previous
From: "Enrico Comini"
Date:
Subject: MS-ACCESS -> PGSQL
Next
From: The Hermit Hacker
Date:
Subject: Search engine on http://www.postgresql.org ...