Default database column type

flunardelli - November 14, 2007 - 19:05
Project:CCK IP Address
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi, there is some reason that why default octet column type is set to char ?
I think that octet data is a integer.

Thanks.

#1

firebus - November 14, 2007 - 19:41

in order to make it easy to encode and display octets with leading zeros.

i know that's dumb. i was being lazy about something else, where i didn't want to right pad the int and cast it as a string. i can't remember exactly what it was.

i regret the decision to have one field per octet, and i'm planning an upgrade to a single field that using ip2long and long2ip to encode and decode.

 
 

Drupal is a registered trademark of Dries Buytaert.