Re: problema con transazioni su Postgres
Roberto Marzialetti <[email protected]>
| Newsgroups | gmane.comp.cms.cold-fusion.devel.italian |
|---|---|
| Message-ID | <CAH4YkK6kcEhYncLwZs41L-wUk+iGfGAXOppwMbEkY90pTCZbCg@mail.gmail.com> |
prova a scrivere a [email protected] Il giorno 26 aprile 2012 17:06, Andrea Veggiani <[email protected]> ha scritto: > > > Ciao,**** > > ** ** > > ho questa query dentro un CFQUERY:**** > > ** ** > > ** ** > > *SET* *TRANSACTION* ISOLATION LEVEL SERIALIZABLE;**** > > *BEGIN* TRANSACTION;**** > > *update* miatabella **** > > *set* numero = ((*select* *MAX*(numero) *AS* numero *from* > miatabella *where* anno = '#arguments.anno#' *and* sigla =#arguments.Sigla# > ')+1)**** > > *where* id = '#arguments.id#';**** > > COMMIT;**** > > ** ** > > Mi sentivo tranquillo ma è successo che sono stati generati due record che > contenevano lo stesso valore nel campo numero.**** > > ** ** > > Cosa può essere successo?**** > > ** ** > > Il DB è Postgrest 8.1.**** > > ** ** > > Grazie mille per l’aiuto.**** > > ** ** > > Ciao**** > > Andrea**** > > > -- Roberto Marzialetti webdeveloper m. 329 0681847