Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)

Liste des GroupesRevenir à cl python 
Sujet : Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)
De : jon+usenet (at) *nospam* unequivocal.eu (Jon Ribbens)
Groupes : comp.lang.python
Date : 10. Sep 2024, 10:38:30
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <slrnve01c6.4dt.jon+usenet@raven.unequivocal.eu>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : slrn/1.0.3 (Linux)
On 2024-09-09, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On Mon, 9 Sep 2024 21:12:51 -0000 (UTC), Jon Ribbens wrote:
On 2024-09-09, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On Mon, 9 Sep 2024 10:00:11 -0000 (UTC), Jon Ribbens wrote:
On 2024-09-09, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
The database only needs to commit when it is explicitly told.
Anything less -- no commit.
 
So the Python code is half-way through a transaction when it throws a
(non-database-related) exception and that thread of execution is
aborted. The database connection returns to the pool ...
>
The DBMS connection is deleted.
 
How does that happen then?
>
You write code to do it.

Ok. So we've moved away from "In any DBMS worth its salt, rollback is
something that happens automatically" and now you're saying it isn't
automatic after all, "you write code to do it". That was my point.
The database provides the tools, but it isn't psychic.

Date Sujet#  Auteur
7 Sep 24 * Re: psycopg2: proper positioning of .commit() within try: except: blocks25Karsten Hilbert
8 Sep 24 `* Re: psycopg2: proper positioning of .commit() within try: except: blocks24Greg Ewing
8 Sep 24  +* Re: psycopg2: proper positioning of .commit() within try: except: blocks20Jon Ribbens
8 Sep 24  i+- Re: psycopg2: proper positioning of .commit() within try: except: blocks1Stefan Ram
8 Sep 24  i+* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)17Lawrence D'Oliveiro
9 Sep 24  ii`* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)16Jon Ribbens
9 Sep 24  ii `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)15Lawrence D'Oliveiro
9 Sep 24  ii  `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)14Jon Ribbens
9 Sep 24  ii   +- Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)1Karsten Hilbert
9 Sep 24  ii   +* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)2Karsten Hilbert
9 Sep 24  ii   i`- Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)1Jon Ribbens
9 Sep 24  ii   `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)10Lawrence D'Oliveiro
9 Sep 24  ii    `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)9Jon Ribbens
9 Sep 24  ii     `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)8Lawrence D'Oliveiro
10 Sep 24  ii      `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)7Jon Ribbens
10 Sep 24  ii       +* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)2Karsten Hilbert
10 Sep 24  ii       i`- Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)1Jon Ribbens
10 Sep 24  ii       `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)4Lawrence D'Oliveiro
11 Sep 24  ii        `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)3Jon Ribbens
11 Sep 24  ii         `* Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)2Lawrence D'Oliveiro
11 Sep 24  ii          `- Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)1Jon Ribbens
9 Sep 24  i`- Re: psycopg2: proper positioning of .commit() within try: except: blocks1Greg Ewing
8 Sep 24  +- Re: psycopg2: proper positioning of .commit() within try: except: blocks1Karsten Hilbert
8 Sep 24  +- Re: psycopg2: proper positioning of .commit() within try: except: blocks1Karsten Hilbert
13 Sep 24  `- Re: psycopg2 positioning of .commit() (Posting On Python-List Prohibited)1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal