From: | "Ian Barwick" <barwick(at)gmail(dot)com> |
---|---|
To: | "Tom Allison" <tom(at)tacocat(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: IP addresses |
Date: | 2007-11-19 16:08:32 |
Message-ID: | 1d581afe0711190808q50a12a94k9a1d83031252cf5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2007/11/19, Tom Allison <tom(at)tacocat(dot)net>:
> I am planning on doing a LOT of work with ip addresses and thought that the
> inet data type would be a great place to start.
>
> But I'm not sure how this works in with accessing the addresses. In perl or
> ruby how is the value returned?
In Perl the value is returned as a scalar.
> Or should I stricly use host() and other functions to be explicit about what
> I'm doing.
>
>
> Another question.
> Given a subnet (eg: 192.168.1.0/24) is there some way to pull all the
> addresses therein?
> I can do this in code - but I was curious if there was a postgres way of
> doing it (didn't see any, but..)
You want the network address functions and operators, I presume:
http://www.postgresql.org/docs/8.2/interactive/functions-net.html
HTH
Ian Barwick
From | Date | Subject | |
---|---|---|---|
Next Message | Sam Mason | 2007-11-19 16:15:02 | Re: Timestamp comparison with string in some special cases |
Previous Message | Andreas Kretschmer | 2007-11-19 16:07:23 | Re: Timestamp comparison with string in some special cases |