Re: Bug in RI

Поиск
Список
Период
Сортировка
От Jeroen van Vianen
Тема Re: Bug in RI
Дата
Msg-id 4.3.2.7.2.20000922095336.00abb1e0@ams010.satama.com
обсуждение исходный текст
Ответ на Re: Bug in RI  (Jeroen van Vianen <jeroen.van.vianen@satama.com>)
Ответы Re: Bug in RI
Список pgsql-hackers
At 21:13 21-9-00 -0700, Stephan Szabo wrote:
>This is a one line patch that will throw a notice with
>what relation name it's trying to open and what it
>got back in RI_FKey_keyequal_upd.  It should say
>the name of your table and a number, but I expect
>the number will be 0.

Yes, it is. So I also found the error: I did a rename table and the 
constraint triggers were not updated with the new table name.

Maybe a little check should be built in to check for fkey == 0, like this 
(from the top of my head, no actual checking):
        fk_rel = heap_openr(tgargs[RI_FK_RELNAME_ARGNO], NoLock);
+       if (fk_rel == NULL) {
+           elog(ERROR, "In foreign key constraint, cannot open relname: %s",
+               tgargs[RI_FK_RELNAME_ARGNO]);
+       }        pk_rel = trigdata->tg_relation;        new_row = trigdata->tg_newtuple;        old_row =
trigdata->tg_trigtuple;


Thanks for your help,


Jeroen




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

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: ecpg is broken in current
Следующее
От: Jeroen van Vianen
Дата:
Сообщение: Patch for Bug in RI