Re: concurrency in stored procedures

Поиск
Список
Период
Сортировка
От Ottavio Campana
Тема Re: concurrency in stored procedures
Дата
Msg-id 46045F7D.1060301@campana.vi.it
обсуждение исходный текст
Ответ на Re: concurrency in stored procedures  (Ottavio Campana <ottavio@campana.vi.it>)
Список 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.


Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Insert fail: could not open relation with OID 3221204992
Следующее
От: Stephen Liu
Дата:
Сообщение: Re: question: knopixx and postgresql on flash drive