Re: I get an error with Foreign Keys

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: I get an error with Foreign Keys
Дата
Msg-id Pine.BSF.4.21.0011301432001.48235-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на I get an error with Foreign Keys  (Brian Powell <brian@owlscreech.com>)
Список pgsql-sql
On Thu, 30 Nov 2000, Brian Powell wrote:

> I have around 40 tables defined, many relying on data in others so I have
> foreign key constraints.  However, whenever I try to delete from any table,
> I get:
> 
> ERROR:  SPI_execp() failed in RI_FKey_cascade_del()
> 
> What generates this?  I need assistance in knowing where to begin.  I
> checked again, and I could not find any circular foreign key constraints...

Hmm, that might mean that the statement being generated inside the
trigger is incorrect in some way that isn't being reported.  Can you 
send a schema dump of your tables and I'll see if I can reproduce it.

BTW: The code in question is probably in src/backend/utils/ri_*.c [I
can't remember the exact ending of the filename].  It should be building
a statement and attempting to execute it using the SPI interface and
it looks like the execute is failing I'd guess by the message.



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

Предыдущее
От: Brian Powell
Дата:
Сообщение: I get an error with Foreign Keys
Следующее
От: Tom Lane
Дата:
Сообщение: Re: String function page incorrect?