You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hmm, guess PG's binary representation allows us to store unexpected inet values. Arguably, this is both a py-postgresql and a postgresql bug as inet instances aren't supposed to have masks AFAIK. This should be an easy fix.
I'd be pleased if this could be fixed, as this bug breaks the INET type.
Reverting the changes to use ipaddress or using ipaddress.ip_interface are valid options.
c.prepare("insert into test_ip (addr) values ('10.0.0.1')")() - saves to table '10.0.0.1'
c.prepare("insert into test_ip (addr) values ($1)")("10.0.0.1") - saves to table '10.0.0.1/0'
When queried with the python-postgres both values looks identical - IPv4Address('10.0.0.1')
but other apps get confused.
Tried with postgres 9.1.3 and 9.1.8, python 3.3 and library 1.1.0
The text was updated successfully, but these errors were encountered: