Re: [GENERAL] Bug in contrib/spi/refint.c
От | Bruce Momjian |
---|---|
Тема | Re: [GENERAL] Bug in contrib/spi/refint.c |
Дата | |
Msg-id | 199810022236.SAA22627@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Bug in contrib/spi/refint.c (Anand Surelia <anand@bytekinc.com>) |
Список | pgsql-general |
> There is a bug in check_foreign_key of refint.c which is bundled with > the standard distribution. It occurs when a trigger calling this > function recursively fires another trigger which calls the same > function. The calling check_foreign_key loses its plan informantion and > when it tries to use it the backend closes its channel. You can check it > with the sql script I am attaching below. > The solution to this is to do a find_plan again before executing it at > line 483 of refint.c. > Therefore two more lines should be added before line 483: > > sprintf(ident, "%s$%u", trigger->tgname, rel->rd_id); > plan = find_plan(ident, &FPlans, &nFPlans); > > before line 483 which is: > ret = SPI_execp(plan->splan[r], kvals, NULL, tcount); Please send a context diff to the patches list. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-general по дате отправления: