]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
docs(pool): a proto-only SQLAlchemy url suffices as we are passing a creator sqlalchemy-nullpool 1067/head
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 12 May 2025 00:44:26 +0000 (02:44 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 12 May 2025 00:51:18 +0000 (02:51 +0200)
docs/advanced/pool.rst

index 50c06cace60e27f4e518b5627b94305001183764..8c84c35549f4c82bd2b4e319142e4fe41d02d4bb 100644 (file)
@@ -470,7 +470,7 @@ For example, the initialization in an async application may look like:
 
         # Create a SQLAlchemy engine using the pool just created
         engine = sqlalchemy.ext.asyncio.create_async_engine(
-            url=db_url.replace("postgresql://", "postgresql+psycopg://"),
+            url="postgresql+psycopg://",
             poolclass=sqlalchemy.pool.NullPool,
             async_creator=pgpool.getconn,
         )