On Fri, Aug 09, 2002 at 08:48:34PM -0500, Steve Lane wrote:
> I believe I read elsewhere that transactional logic doesn't work or doesn't
> apply in a function. And the message above seems to imply that the function
> will behave transactionally without explicit begin/commit.
I think you mean that you cannot start new transactions within a function.;
This is true as postgres does not support nested transactions. However,
functions are always within a transaction as they always appear as part of a
statement at the top level.
> So what do I need to do, or not do, in order that the function executes the
> way I intend, that all three UPDATES will succeed or fail?
Nothing. It'll work that way anyway.
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.