From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marc Lamothe <mlamothe@openface.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problem using IP functions
Date: Sat, 12 May 2001 23:44:24 -0400
Message-ID: <22976.989725464@sss.pgh.pa.us> (raw)
In-Reply-To: <9dhig8$2nfd$1@news.tht.net>
References: <9dhig8$2nfd$1@news.tht.net>
"Marc Lamothe" <mlamothe@openface.ca> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, mlamothe@openface.ca
Subject: Re: Problem using IP functions
In-Reply-To: <22976.989725464@sss.pgh.pa.us>
References: <9dhig8$2nfd$1@news.tht.net> <22976.989725464@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox