Re: Foreign key behavior different in a function and outside - Mailing list pgsql-general

From Richard Huxton
Subject Re: Foreign key behavior different in a function and outside
Date
Msg-id 4B94CB8E.20705@archonet.com
Whole thread Raw
In response to Re: Foreign key behavior different in a function and outside  (Mridula Mahadevan <mmahadevan@stratify.com>)
List pgsql-general
On 05/03/10 18:12, Mridula Mahadevan wrote:
> Richard, To answer your questions, I have a live application that is
> running on postgresql. We are seeing this issue on certain
> installations and not on others. So the code is no different in each
> set up. I also added the trigger to table B and then the foreign key
> error is thrown in all set ups. But without the trigger a delete on
> table B from within a function assumes cascade delete even when one
> is not specified. Again only in some cases, I can send you the entire
> procedure if it helps (the one I have below only has the relevant
> parts).

But does the test code you sent show this problem on:
1. all installations
2. some installations
3. none of the installations
4. Don't know - haven't tried the test code

If the test code shows the problem then we know it's something basic in
your PostgreSQL installations. If it doesn't then it's something in the
setup of the databases.

I don't think the problem has anything to do with the code of the
function. You have checked that the code in your functions makes sense
and looked at it on servers where it works and it doesn't. If the
problem was there I'm sure you'd have seen it.


--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: FSM and VM file
Next
From: chaoyong wang
Date:
Subject: 2 questions when using vs2005 to debug PG