On 10/22/12 4:11 PM, Juha Heinanen wrote:
lcr_gw table has:
ip_addr varchar(47)
trusted table has:
src_ip varchar(50)
address table has:
ip_addr varchar(48)
why is it that they are not all the same? also, why the common length is not 8 * 4 + 7 = 39 (http://en.wikipedia.org/wiki/IPv6#Address_format)?
if you take in consideration the ipv4 tunneling address format, then it is 45, plus square bracket representation [...] results in 47.
For safety, i would use 48, to allow zero termination -- not sure it is actually needed, just that we have some custom db backend that might require it it, like dbtext. Anyhow, varchar(x) is well known db systems allocate only what is needed.
Cheers, Daniel
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users