Re: [GENERAL] status on IPv6 implementation...

Поиск
Список
Период
Сортировка
От Tom Ivar Helbekkmo
Тема Re: [GENERAL] status on IPv6 implementation...
Дата
Msg-id 863e90zx3b.fsf@athene.nhh.no
обсуждение исходный текст
Ответ на Re: [GENERAL] status on IPv6 implementation...  (Lorenzo Huerta <lorenzo@nmsu.edu>)
Список pgsql-general
Lorenzo Huerta <lorenzo@nmsu.edu> writes:

> Does it treat the ip as text, or numeric value?

Neither.  It handles IPV4 CIDRs, of which host addresses are a special
case, as just what they are.  Input and output are textual, of course.
The internal storage format looks like this:

typedef struct {
  unsigned char family;        /* AF_INET (or, soon, AF_INET6) */
  unsigned char bits;        /* CIDR prefix length */
  union {
    u_int32_t ipv4_addr;    /* network byte order */
                /* add IPV6 address type here */
  } addr;
} ipaddr_struct;

Oh, and the actual method of storage in the database is variable
length, so even when IPV6 code is added, the IPV4 storage format won't
change in size or layout.

-tih
--
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Regex problems
Следующее
От: Andrea Antibo
Дата:
Сообщение: Re: [GENERAL] make[2]: *** [psql] Error 1