Re: RI_ConstraintTrigger question

Поиск
Список
Период
Сортировка
От George Essig
Тема Re: RI_ConstraintTrigger question
Дата
Msg-id 6744b38505092621201c3d4f62@mail.gmail.com
обсуждение исходный текст
Ответ на RI_ConstraintTrigger question  ("pobox@verysmall.org" <pobox@verysmall.org>)
Ответы Re: RI_ConstraintTrigger question  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-general
On 9/26/05, pobox@verysmall.org <pobox@verysmall.org> wro
We have a database with about 30 tables and some RI. The RI constraints,
however, were not named upon creation of the database 2-3 years ago and
now when we get an error it contains <unnamed> for the constraint.

I tried Google and the documentation, and I still have 2 questions -

1. Is it possible to rename RI_ConstraintTrigger, so that we do not get
<unnamed> in the errors.

2. Is there somewhere explanation what the RI_FKey_ procedures mean?

I think RI stand for referential integrity.  Foreign keys used to be implemented using 'create constraint trigger' which automatically names triggers 'RI_ConstraintTrigger_' then some integer which I guess is an oid (object id). 

Constraint triggers execute functions to implement a constraint.  RI_FKey_... are the functions that implement foreign key constraints for different events like insert, update, and delete.

When you upgrade a database it's likely that the oids for different database objects will change.  In sounds like somehow you upgraded and retained references to old oids which don't exist anymore.  Just a guess.

I suggest you upgrade to a newer version of PostgreSQL and drop all of the 'RI_ConstraintTrigger_' trigger and recreate the foreign keys.

George Essig

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

Предыдущее
От: Gnanavel S
Дата:
Сообщение: Re: How many insert + update should one transaction handle?
Следующее
От: "surabhi.ahuja"
Дата:
Сообщение: insertion becoming slow