Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4D3iWA07318 for ; Sat, 12 May 2001 23:44:32 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f4D3iPR22979; Sat, 12 May 2001 23:44:25 -0400 (EDT) To: "Marc Lamothe" cc: pgsql-sql@postgresql.org Subject: Re: Problem using IP functions In-reply-to: <9dhig8$2nfd$1@news.tht.net> References: <9dhig8$2nfd$1@news.tht.net> Comments: In-reply-to "Marc Lamothe" message dated "Fri, 11 May 2001 16:33:08 -0400" Date: Sat, 12 May 2001 23:44:24 -0400 Message-ID: <22976.989725464@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200105/117 X-Sequence-Number: 2933 "Marc Lamothe" writes: > The subnet_number column is a varchar(16) which I assume you can compare > with a text data type, which is what host() returns. Are you on a pre-7.1 Postgres release? host() is buggy before 7.1 --- it includes a trailing null in its output, which it shouldn't oughta have done. You can't see the null from outside the system, but it manages to mess up text comparisons anyway. BTW, you should consider using inet or cidr datatype for that column rather than varchar... regards, tom lane