We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please complete the following information:
psycopg2==2.9.6
3.11.2
Describe the bug Please let us know:
1: what you did
import ipaddress from datetime import datetime import psycopg2 import psycopg2.extras psycopg2.extras.register_ipaddress() # blabla with conn.cursor() as cur: cur.execute( r'INSERT INTO tablename (inet, timestamp) VALUES (%s, %s)', (ipaddress.ip_address('127.0.0.1'), datetime.now()) )
2: what you expected to happen
ipaddress inserted into inet
3: what happened instead
psycopg2.ProgrammingError: can't adapt type 'IPv4Address'
psycopg2/lib/_ipaddress.py
Line 61 in 3450d15
The text was updated successfully, but these errors were encountered:
Weird. I have no idea why this function only handles Network and Interface address.
Psycopg 3 does it better.
Sorry, something went wrong.
No branches or pull requests
Please complete the following information:
psycopg2==2.9.6
3.11.2
Describe the bug
Please let us know:
1: what you did
2: what you expected to happen
ipaddress inserted into inet
3: what happened instead
psycopg2/lib/_ipaddress.py
Line 61 in 3450d15
The text was updated successfully, but these errors were encountered: