Closed
Description
Hello! Thank you for your awesome job!
This code creates different values in table
await conn.execute("CREATE table test1 (id serial primary key, ip inet not null)")
ip = '10.78.243.196'
ip32 = '10.78.243.196/32'
await conn.execute("INSERT INTO test1 (ip) VALUES($1)", ip)
await conn.execute("INSERT INTO test1 (ip) VALUES($1)", '10.78.243.196')
await conn.execute("INSERT INTO test1 (ip) VALUES('10.78.243.196')")
await conn.execute("INSERT INTO test1 (ip) VALUES('10.78.243.196/32')")
await conn.execute("INSERT INTO test1 (ip) VALUES($1)", ip32) // Exception ValueError: '10.78.243.196/32' does not appear to be an IPv4 or IPv6 address
id | ip
----+-----------------
1 | 10.78.243.196/0
2 | 10.78.243.196/0
3 | 10.78.243.196
4 | 10.78.243.196
(3 rows)
I have latest version in pip asyncpg==0.6.3
version
------------------------------------------------------------------------------------------
PostgreSQL 9.5.3 on x86_64-pc-linux-gnu, compiled by gcc (Debian 4.9.2-10) 4.9.2, 64-bit
Could you please take a look?