Re: function execution problem - plpgsql - Mailing list pgsql-general

From Roman Neuhauser
Subject Re: function execution problem - plpgsql
Date
Msg-id 20050721103531.GB5342@isis.sigpipe.cz
Whole thread Raw
In response to function execution problem - plpgsql  ("Zoltan Bartko" <silvanus@azet.sk>)
List pgsql-general
# silvanus@azet.sk / 2005-07-21 10:18:05 +0200:
> I have two functions: funcA() drops a row from table A, funcB() drops a
> row from table B that references table A. funcA() calls funcB() and
> issues a delete command after returning from funcB(). I get an error,
> stating that it can not be done, because there is a row in B that can
> not be deleted with deleting the particular row from A.
>
> So now: Why does this happen? Is it because a function is a transaction?
> why do series of update/delete operations work fine in a single
> function, but fail as soon as one of these operations is performed by
> function? Is there any way to avoid this behavior?

    Show us definitions of the tables and functions in question.

--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

pgsql-general by date:

Previous
From: Marco Colombo
Date:
Subject: Re: RAMFS with Postgres
Next
From: Dave Cramer
Date:
Subject: Re: [HACKERS] No user being created during initdb for OS X