Re: embedded sql interface to ip address type

Поиск
Список
Период
Сортировка
От D'Arcy J.M. Cain
Тема Re: embedded sql interface to ip address type
Дата
Msg-id 200303220533.30512.darcy@druid.net
обсуждение исходный текст
Ответ на Re: embedded sql interface to ip address type  (Michael Meskes <meskes@postgresql.org>)
Ответы Re: embedded sql interface to ip address type  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-interfaces
> 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.



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: persistent variables between cross-calls in C functions
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: esql problem