Re: concurrency in stored procedures - Mailing list pgsql-general

From Ottavio Campana
Subject Re: concurrency in stored procedures
Date
Msg-id 46045F7D.1060301@campana.vi.it
Whole thread Raw
In response to Re: concurrency in stored procedures  (Ottavio Campana <ottavio@campana.vi.it>)
List pgsql-general
Ottavio Campana wrote:
> Anyway, apart from a couple of errors in the code i wrote (an in isn't
> closed and exception handling is not correctly written), can I be sure
> that the code in the sub-block works an a snapshot of the db?

It seems not to work, I put it into my application and I got

Error Type: ProgrammingError
Error Value: ERROR: SET TRANSACTION ISOLATION LEVEL must be called
before any query CONTEXT: SQL statement "set transaction isolation level
serializable" PL/pgSQL function "test_function" line 31 at SQL statement
select test_function ( 11, 'tizio', '', ' ', '', ' ', '', ' ', ' ', ' ',
'', '', ' ', ' ', '0.0', ' ', '', 1, 1, 0.0, 1 ) as risultato;

So I think I'll have to use locking....

--
Non c'e' piu' forza nella normalita', c'e' solo monotonia.


Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Insert fail: could not open relation with OID 3221204992
Next
From: Stephen Liu
Date:
Subject: Re: question: knopixx and postgresql on flash drive