IP :
typedef struct
{
unsigned char family;
unsigned char bits;
unsigned char ipaddr[16];
} inet_struct;
, "" ipaddr (4 IP4, 16 IP6) ( IP4/6).
, varlena, :
typedef struct
{
char vl_len_[4];
inet_struct inet_data;
} inet;
, IP4 :
1 byte varlena
1 byte address family
1 byte netmask
4 raw bytes
===========
7 byte total
IP6 19 .
. PostgreSQL 4- varlena. 3 (IP4: 10, IP6: 22). , 4 . 2 , 12 24 .
.