tech:notes_postgres_python

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

tech:notes_postgres_python [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:notes_postgres_python [2025/11/20 16:38] (Version actuelle) Jean-Baptiste
Ligne 70: Ligne 70:
 === Warning === Warning
  
-Unlike file objects or other resources, exiting the connection’s with block doesn’t close the connection, but only the transaction associated to it. If you want to make sure the connection is closed after a certain point, you should still use a try-catch block:+Unlike file objects or other resources, exiting the connection’s with block doesn’t close the connection, but only the transaction associated to it. If you want to make sure the connection is closed after a certain point, you should still use a try-catch block :
 <code python> <code python>
 conn = psycopg2.connect(DSN) conn = psycopg2.connect(DSN)
tech/notes_postgres_python.1742825205.txt.gz · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki