Hi,

Thank you, Aymeric, for summing up the discussion this way. The division into 
two separate problems is indeed required, and I fully support the idea of 
setting max_length's default to 100 or 120.

There seem to be just two points worth adding to your summary:

On Monday 29 February 2016 11:19:02 Aymeric Augustin wrote:
> 
> 2) How can we make it easy for PostgreSQL users to just use VARCHAR()?
> 
> Since this is a PostgreSQL-specific feature, having a variant of CharField
> in django.contrib.postgres that supports and perhaps even defaults to
> unlimited length shouldn’t be controversial.
> 

The first -- I believe it was raised very early on by Christophe Pettus -- is 
that Django already has a field that manifests on PG as VARCHAR(), and that is 
TextField. However, I don't like the idea that PG users should be using 
TextField(widget=TextInput) as a replacement for CharField; I find that 
counter-intuitive -- even if just because it is a "bad name". Names are 
important.

The second -- in response to a comment made by Josh Smeaton -- is that having 
django.db.models.CharField with default max_lenth=N (for some finite N) and 
django.contrib.postgres.CharField with default max_length=None (meaning 
infinity) sounds like a bad idea.

> 
> I hope this helps!

I'm certain it did!

Shai.

Reply via email to