pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
I get an error with Foreign Keys
2+ messages / 2 participants
[nested] [flat]

* I get an error with Foreign Keys
@ 2000-11-30 19:47 Brian Powell <brian@owlscreech.com>
  2000-11-30 22:35 ` Re: I get an error with Foreign Keys Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Brian Powell @ 2000-11-30 19:47 UTC (permalink / raw)
  To: pgsql-sql

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...

Any help on where to search is appreciated.

Thanks,

--Brian




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: I get an error with Foreign Keys
  2000-11-30 19:47 I get an error with Foreign Keys Brian Powell <brian@owlscreech.com>
@ 2000-11-30 22:35 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephan Szabo @ 2000-11-30 22:35 UTC (permalink / raw)
  To: Brian Powell <brian@owlscreech.com>; +Cc: 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.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-11-30 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-11-30 19:47 I get an error with Foreign Keys Brian Powell <brian@owlscreech.com>
2000-11-30 22:35 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox