On 9/7/24 14:59, Karsten Hilbert wrote:
Am Sat, Sep 07, 2024 at 02:47:49PM -0700 schrieb Adrian Klaver:
It is also insufficient because the .commit() itself may
elicit exceptions (from the database).
Yeah with Serializable that is part of the package:
No complaints :-)
try:
Am Sat, Sep 07, 2024 at 02:47:49PM -0700 schrieb Adrian Klaver:
> >It is also insufficient because the .commit() itself may
> >elicit exceptions (from the database).
>
> Yeah with Serializable that is part of the package:
No complaints :-)
> > try:
> > do something
> > excep
On 9/7/24 14:20, Karsten Hilbert wrote:
Am Sat, Sep 07, 2024 at 02:09:28PM -0700 schrieb Adrian Klaver:
Right, and this was suggested elsewhere ;)
And, yeah, the actual code is much more involved :-D
I see that.
The question is does the full code you show fail?
The code sample you show in
Am Sat, Sep 07, 2024 at 02:09:28PM -0700 schrieb Adrian Klaver:
> >Right, and this was suggested elsewhere ;)
> >
> >And, yeah, the actual code is much more involved :-D
> >
>
> I see that.
>
> The question is does the full code you show fail?
>
> The code sample you show in your original post is
On 9/7/24 13:45, Karsten Hilbert wrote:
Am Sat, Sep 07, 2024 at 01:03:34PM -0700 schrieb Adrian Klaver:
In the case you show you are doing commit() before the close() so any errors in
the
transactions will show up then. My first thought would be to wrap the commit()
in a
try/except and deal w
Am Sat, Sep 07, 2024 at 01:03:34PM -0700 schrieb Adrian Klaver:
> In the case you show you are doing commit() before the close() so any errors
> in the
> transactions will show up then. My first thought would be to wrap the
> commit() in a
> try/except and deal with error there.
Right, and this
On 9/7/24 12:44, Karsten Hilbert wrote:
Am Sat, Sep 07, 2024 at 09:46:03AM -0700 schrieb Adrian Klaver:
No I don't but - to my understanding - an ongoing transaction
is being closed upon termination of the hosting connection.
Unless .commit() is explicitely being issued somewhere in the
code
Am Sat, Sep 07, 2024 at 09:46:03AM -0700 schrieb Adrian Klaver:
> >unto now I had been thinking this is a wise idiom (in code
> >that needs not care whether it fails to do what it tries to
> >do^1):
> >
> > conn = psycopg2.connection(...)
>
> In the above do you have:
>
> https://www.psycopg.o
On 9/7/24 08:48, Karsten Hilbert wrote:
Dear all,
unto now I had been thinking this is a wise idiom (in code
that needs not care whether it fails to do what it tries to
do^1):
conn = psycopg2.connection(...)
In the above do you have:
https://www.psycopg.org/docs/extensions.html#psyco