Re: [ADMIN] compare integer to inet

2011-08-21 Thread Dimitri Fontaine
Bill MacArthur writes: > The reason I ask for this is that we have a dataset that contains > ranges of IP addresses, associated with countries, where the addresses > are represented as integers (bigints). I would then use the ip4r extension, which is very very good for that kind of things. htt

Re: [ADMIN] compare integer to inet

2011-08-19 Thread Scott Ribe
On Aug 19, 2011, at 4:24 PM, Bill MacArthur wrote: > select case when '41.224.0.0'::inet = 702545920 then true else false end; If addition works, maybe subtraction works. So subtract 0? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via

[ADMIN] compare integer to inet

2011-08-19 Thread Bill MacArthur
Greetings, Considering that this can be done: network=# SELECT '0.0.0.0'::inet + 702545920; ?column? 41.224.0.0 (1 row) How can I perform an operation similar to this that works? network=# select case when '41.224.0.0'::inet = 702545920 then true else false end; ERROR: operat