inet types and LIKE doesn't work as expected

From: "Phil Mayers" <p(dot)obfuscate(dot)mayers(at)ic(dot)ac(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: inet types and LIKE doesn't work as expected
Date: 2001-09-20 14:21:30
Message-ID: 9ocu16$iii$1@jura.cc.ic.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 |
+------------------------------------------+

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tille, Andreas 2001-09-20 14:28:23 Re: Performance question (stripped down the problem)
Previous Message Phil Mayers 2001-09-20 14:13:32 FULL JOIN: macaddr equality is not a mergejoinable join condition?