From: D'Arcy J.M. Cain <darcy@druid.net>
To: Michael Meskes <meskes@postgresql.org>
To: Rob Fowler <postgres@mianos.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: embedded sql interface to ip address type
Date: Sat, 22 Mar 2003 05:33:30 -0500
Message-ID: <200303220533.30512.darcy@druid.net> (raw)
In-Reply-To: <20030321150648.GB27690@feivel.fam-meskes.de>
References: <20030321064112.GA5117@firewall.keta.mine.nu>
<20030321150648.GB27690@feivel.fam-meskes.de>
> What exactly do you mean? A C type for IP addresses? That doesn't
> exist. Right now this type has to be stored in character strings.
You mean base types written in C? We certainly do.
darcy=# select '123.4.5.6'::inet << '123.4.5.0/24'::cidr;
?column?
----------
t
(1 row)
darcy=# select '123.4.5.6'::inet << '123.4.6.0/24'::cidr;
?column?
----------
f
(1 row)
The above says that the IP address 123.4.5.6 is in the CIDR block 123.4.5.0/24
but not in 123.4.6.0/24.
We also have a MAC address type. See the documentation pages at
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=datatype-net-types.html
and
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=functions-net.html
for details.
--
D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: darcy@druid.net, meskes@postgresql.org, postgres@mianos.com
Subject: Re: embedded sql interface to ip address type
In-Reply-To: <200303220533.30512.darcy@druid.net>
* 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