Steve Sobol wrote:

> 
> 
> --On Sunday, September 24, 2006 1:34 PM +0800 W B Hacker 
> <[EMAIL PROTECTED]> wrote:
> 
> 
>>> The only real downside to this solution was having to list the entire
>>> /27  worth of IP addresses one at a time, but I can live with that
>>> shortcoming.  On the other hand, if anyone has figured out how to use
>>> CIDR notation in  MySQL hostlist queries, let me know and I'll send you
>>> a virtual beer!
>>
>>
>> Should be intuitive if you are using the 'network' data types (INET, 
>> CIDR,
>> MACADDR) for storage and retreival.
> 
> 
> I don't think those types are available in MySQL. But I haven't looked, 
> and I'm using an older version of the software anyhow.
> 

Age has its virtues - pre-DB2, pre-SQL PostgreSQL's age, not mine ..

;-)

I did look - after posting - and the 'network' data types are NOT listed for 
MySQL.

OTOH, 'license wars' aside, there is no longer much downside to MySQl -> PG 
migration, and 'transactional' awareness, better ACID complaince, etc. come 
along w/o need of kludogng in an InnoDb back-end, etc.

On modern hardware, either MySQL or PG will be (more than) 'fast enough', and 
PG 
takes MySQL tables perhaps a bit more readily than the reverse, plus being more 
'standards' compliant w/r SQL syntax.

- the special data types and other extensions, of course, being among the 
exceptions, but useful, nonetheless.

Except for a few well-documented syntax differences, seldom used in Exim SQL 
setups, one doesn't even have to change Exim's lookup calls from pg_sql to 
my_sql or the reverse.

Another way - as we used to have to do in RIM/R:Base, was to 'emulate' a 
missing 
data type by subterfuge.

In this case, one could perhaps store the IP *not* in dotted notation, but in 
binary or hex (an easy external conversion) in two fields of a record, an upper 
bound and a lower bound.

Where the upper and lower bounds were identical, a single IP would be matched, 
where there was a range between them, a range.

But my roots are showing...

'forth definitions binary...'

;-)

Bill





-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to