On Thu, 2002-02-28 at 16:57, OtisUsenet wrote:
> This is the simple_fun function that is causing the above error:
>
> CREATE FUNCTION simple_fun() RETURNS INTEGER AS '
> BEGIN
> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
> BEGIN;
> RETURN 1;
> END;
> END;
> ' LANGUAGE 'plpgsql';
>
> This is as simple as it gets.
> I think my syntax is correct (I checked Practical PostgreSQL
> book as well as a number of 7.2 PDF documents, etc.).
>
> Am I missing a secret ingredient here?
A function already happens inside a transaction, whether implicit or
explicit. You cannot start another transaction inside it; PostgreSQL
does not support nested transactions.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
"Give, and it will be given to you. A good measure,
pressed down, taken together and running over,
will be poured into your lap. For with the same
measure that you use, it will be measured to
you." Luke 6:38