psycopg / psycopg-website

Source for the psycopg.org website
https://www.psycopg.org/
4 stars 5 forks source link

articles/2020/11/24/psycopg3-adaptation/ #3

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

The psycopg3 adaptation system — Psycopg

Python adapter for PostgreSQL

https://www.psycopg.org/articles/2020/11/24/psycopg3-adaptation/

aklaver commented 3 years ago

I'm liking it. The Dumper/Loader mechanism looks to be very useful. I'm especially interested in trying out the new binary adaptation. One edit comment, in the first sentence under 'Server-side binding' I believe it should be psycopg2 not psycopg3.

dvarrazzo commented 3 years ago

Thank you @aklaver - fixing it.

Binary adaptation works ok but many types still need a binary Dumper/Loader (numeric and date/time objects among the builtins). If you want to try it out, it's enough to use %b placeholders to send Python parameters in binary format. In order to receive binary results, at the moment the interface would be to create a binary cursor with conn.cursor(format=Format.BINARY) but I'm not sold on it just yet.

soluwalana commented 3 years ago

I am incredibly excited to get psycopg3 integrated in my new projects! Keep up the excellent work! Dynamic copy() is something that has been sorely missed for altogether too long.