On Wednesday 20 January 2016 23:48:59 Tim Graham wrote:
> A proposal has been raised to change the validation for
> CommaSeparatedIntegerField to allow negative numbers [1]. This is obviously
> backwards-incompatible, so I don't think it'll fly without some option to
> control the behavior, however, I wanted to ask if there's any reason not to
> deprecate the field at this point. From a quick glance, I believe it could
> be replaced with
> CharField(validators=[validate_comma_separated_integer_list]). The only
> database storage difference is on Oracle:
> 
>         'CharField': 'NVARCHAR2(%(max_length)s)',
>         'CommaSeparatedIntegerField': 'VARCHAR2(%(max_length)s)',
> 
> Is this difference meaningful? 

<guess from="memory"> The two field types use different encodings, and on 
oracle 
the maximum field length for character columns is in bytes rather than 
characters; so, in many settimgs, I think you'll be able to store twice as 
many numbers in a CommaSeparatedIntegerField as in the equivalent CharField.
</guess>

It's an edge case, either way (who puts hundreds of numbers in such a field?)

Shai.

Reply via email to