Differences from Psycopg2
psycopg.org
psycopg.org
PostgreSQL can be used for many but not all sci fi stories. It's quite lacking about the past though [1] Even intervals are not so wide, only a plus minus 178 M years range?
[1] https://www.postgresql.org/docs/current/datatype-datetime.ht...
These kind of changes are nice from a migration point of view, but eventually cause a significant amount of inconspicuous bugs. The framework now behaves differently in different applications.
And I actually don't like reading about potential client-side merging. I've been taught to only use parameterized queries, and not to write merging myself. I only trust the database to make the right call here.
I do not know if others have the same experience, but comparing Psycopg2/3 with SQL Alchemy I think the latter is way more robust and more developer friendly, but coming from a DBA background Psycopg sounds way simpler, even for the sake of writing pythonic code.
If you are using SQL alchemy on a postgres db, you might be using psycopg without knowing it.
Psycopg is the lower level lib that implements the PostgreSQL protocol.
See https://docs.sqlalchemy.org/en/20/dialects/postgresql.html#d...
asyncpg has these two C files and also uses Cython as far as I can see.
https://github.com/MagicStack/asyncpg/blob/master/asyncpg/pr...
https://github.com/MagicStack/asyncpg/blob/master/asyncpg/pr...
If you are interested here is a post by the psycopg author about psycopg2 and 3 and performance versus asyncpg.
https://www.varrazzo.com/blog/2020/05/19/a-trip-into-optimis...