Re: problema con transazioni su Postgres

Fabio Serra <[email protected]>
Newsgroups gmane.comp.cms.cold-fusion.devel.italian
Message-ID <CANWq04ZFz_GJJ=ROOiPFscOaoLQvzbh9PBFJJw7j97pG5bDLww@mail.gmail.com>
Ma c'è dalla 7 di postgres se non sbaglio. Perchè non usi cftransaction?
Comunque devi usare cflock.
La transazione ti garantisce che i dati letti siano solo quelli committed
quindi il tuo *select* *MAX*(numero)
leggerà lo stesso numero per le due query contemporanee.
Poi non mi torna che cerchi il max per anno e numero ma l'update lo fai su
id. Quindi potrebbero essere due righe diverse.


2012/4/26 Andrea Veggiani <[email protected]>

> Grazie,
>
> me lo hanno appena scritto anche nell’altra lista che mi ha suggerito
> Roberto.
>
> Ma detto questo poi serve la 9.1 davvero come dice un altro nella lista o
> basta la 9.0 come ho io?
>
> Mi sto leggendo la documentazione ma fatico a chiarirmi le idee:
>
>
> http://www.postgresql.org/docs/9.0/static/transaction-iso.html#XACT-SERIALIZ
> ABLE
>
> Ciao e grazie
> Andrea
>
> From: [email protected] [mailto:[email protected]] On Behalf
> Of rudi
> Sent: giovedì 26 aprile 2012 17:35
> To: [email protected]
> Subject: Re: problema con transazioni su Postgres
>
>
> On 04/26/2012 05:06 PM, Andrea Veggiani wrote:
> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
> afaik, prima fai la BEGIN e poi fa la SET
>
>
> --
> rd
>
> Peel your own image from the mirror.
> Sit. Feast on your life.
>
>
>
>
> ------------------------------------
>
> CFMentor
> http://www.cfmentor.comLink utili di Yahoo! Gruppi
>
>
>
>


-- 
Fabio Serra
[email protected]
http://faser.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.