]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Use oid 0 for unknown typed and string casting
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 5 Nov 2020 14:40:17 +0000 (15:40 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 7 Nov 2020 01:49:37 +0000 (01:49 +0000)
commitd65a93d495cfef66e95d3f46180dc5ac5a046cdd
treeb6d09db52ef1513485714f02ab4b93643803cf57
parent3ecbd60d8044b109cd4a4db8687b9cf8d16b57f3
Use oid 0 for unknown typed and string casting

Using unknown (0) oid instead of text (25) works better to throw normal
strings at typed targets (e.g. columns) and expect them to work, a
behaviour similar to client-side binding. However Postgres < 10 refuse
to emit columns with unknown oid.
psycopg3/psycopg3/adapt.py
psycopg3/psycopg3/types/array.py
psycopg3/psycopg3/types/text.py
tests/test_adapt.py
tests/test_cursor.py
tests/test_cursor_async.py
tests/types/test_composite.py
tests/types/test_text.py