Re: New cast between inet/cidr and bytea

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: New cast between inet/cidr and bytea
Дата
Msg-id 200705301901.l4UJ1vA24431@momjian.us
обсуждение исходный текст
Ответ на New cast between inet/cidr and bytea  (Zoltan Boszormenyi <zb@cybertec.at>)
Ответы Re: New cast between inet/cidr and bytea  (Zoltan Boszormenyi <zb@cybertec.at>)
Список pgsql-hackers
Zoltan Boszormenyi wrote:
> Hi,
> 
> we at Cybertec have developed cast functions in C between
> inet/cidr <-> bytea for a client and we would like to submit it.
> 
> This is how it works:
> - IPv4 inet/cidr value will return 4 bytes if the netmask covers all 32 
> bits.
>   It returns 5 bytes if the netmask is shorter than 32 bits.
> - Similarly for IPv6, 12[+1] bytes is returned.
> - 4, 5, 12 or 13 bytes long bytea values are converted
>   to an inet/cidr value, the 5th or 13th byte is range-checked
>   to be a valid netmask value.
> 
> What are the requirements for it to be accepted
> as a core cast function or as a contrib module?

You discuss it on the hackers list.  Have you read the developer's FAQ? 
What is the use case for such a cast?

--  Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Changing checkpoint_timeout to another name?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Changing checkpoint_timeout to another name?