Re: [ADMIN] ERROR: fmgr_info: function 18375: cache lookup failed

Поиск
Список
Период
Сортировка
От Antonio Garcia Mari
Тема Re: [ADMIN] ERROR: fmgr_info: function 18375: cache lookup failed
Дата
Msg-id 199808131906.VAA09126@pixie.at4.net
обсуждение исходный текст
Ответ на ERROR: fmgr_info: function 18375: cache lookup failed  ("Antonio Garcia Mari" <agarcia@at4.net>)
Список pgsql-admin
<color><param>7F00,0000,0000</param>> Does anybody know what this error mean?

>

> update empresa set clave_provincia=8 where clave_empresa=8046;

> ERROR:  fmgr_info: function 18375: cache lookup failed

>


</color>Ok, nobody answered but i found my problem. It's related to a weird pgsql bug.

Assume i got a trigger called empresaclave_empresa1. Usually, you cannot create two triggers with
the same name:


projas_db=> CREATE TRIGGER empresaclave_empresa1 AFTER DELETE ON empresa

projas_db->         FOR EACH ROW EXECUTE PROCEDURE

projas_db->         check_foreign_key ('1', 'cascade', 'clave_empresa', 'sectorempresa', 'clave_empresa');

ERROR:  CreateTrigger: trigger empresaclave_empresa1 already defined on relation empresa


But if you exceed the max 32 chars for the trigger name:


projas_db=> CREATE TRIGGER nn0123456789012345678901234567890123456789 AFTER DELETE
ON empresa FOR EACH ROW EXECUTE PROCEDURE

check_foreign_key ('1', 'cascade', 'clave_empresa', 'sectorempresa', 'clave_empresa');

CREATE

projas_db=> CREATE TRIGGER nn0123456789012345678901234567890123456789 AFTER DELETE
ON empresa FOR EACH ROW EXECUTE PROCEDURE

check_foreign_key ('1', 'cascade', 'clave_empresa', 'sectorempresa', 'clave_empresa');

CREATE

projas_db=> CREATE TRIGGER nn0123456789012345678901234567890123456789 AFTER DELETE
ON empresa FOR EACH ROW EXECUTE PROCEDURE

check_foreign_key ('1', 'cascade', 'clave_empresa', 'sectorempresa', 'clave_empresa');

CREATE


And if you try to delete your trigger you'll think you're getting crazy:


projas_db=> DROP TRIGGER nn0123456789012345678901234567890123456789  ON empresa; <bold>

</bold>ERROR:  DropTrigger: there is no trigger nn0123456789012345678901234567890123456789 on
relation empresa


projas_db=> select tgname from pg_trigger;

tgname

-------------------------------

empresaclave_empresa1

comunidadclave_comunidad

existen_empresas_en_este_sector

la_comunidad_no_existe

la_empresa_no_existe

el_sector_no_existe

imposible_modificar_clave

nn01234567890123456789012345678

nn01234567890123456789012345678

nn01234567890123456789012345678


You have THREE triggers with the same truncated name.


projas_db=> drop trigger nn01234567890123456789012345678 on empresa;

NOTICE:  DropTrigger: found (and deleted) 3 trigger nn01234567890123456789012345678 on relation
empresa

DROP


My problem was caused by an old lost truncated trigger trying to call a nonexistent function.



<nofill>
Antonio Garcia Mari
Mallorca (Spain)


В списке pgsql-admin по дате отправления:

Предыдущее
От: Bernd Johannes Wuebben
Дата:
Сообщение: Re: [ADMIN] FATAL 1: SetUserId:
Следующее
От: JOHN COOK
Дата:
Сообщение: Re: [ADMIN] FATAL 1: SetUserId: