inet types and LIKE doesn't work as expected - Mailing list pgsql-general

From Phil Mayers
Subject inet types and LIKE doesn't work as expected
Date
Msg-id 9ocu16$iii$1@jura.cc.ic.ac.uk
Whole thread Raw
List pgsql-general
Try this:

hdbdev=> create table ips ( ip inet, ip_txt varchar(15) );
hdbdev=> insert into ips (ip,ip_txt) values ('192.168.1.1','192.168.1.1');
hdbdev=> select * from ips where ip like '192.168.1.1';
 ip | ip_txt
----+--------
(0 rows)

hdbdev=> select * from ips where ip_txt like '192.168.1.1';
     ip      |   ip_txt
-------------+-------------
 192.168.1.1 | 192.168.1.1
(1 row)

That seems inconsistent?

--
Regards,
Phil

+------------------------------------------+
| Phil Mayers                              |
| Network & Infrastructure Group           |
| Information & Communication Technologies |
| Imperial College                         |
+------------------------------------------+



pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: New To PostgreSQL
Next
From: news@[removetoreply]gemini-it.com (Neil Everton)
Date:
Subject: ISAM > postgreSQL tutorials