Re: Increase default integer keys to 64 bits

2021-01-29 Thread Adam Johnson
64 bits is the default for new projects. See the 3.2 release notes: https://docs.djangoproject.com/en/dev/releases/3.2/ On Fri, 29 Jan 2021 at 17:23, Christophe Pettus wrote: > > > > On Jan 29, 2021, at 07:40, charettes wrote: > > > > As Tom said Django 3.2 supports swapping the default primary

Re: Increase default integer keys to 64 bits

2021-01-29 Thread Christophe Pettus
> On Jan 29, 2021, at 07:40, charettes wrote: > > As Tom said Django 3.2 supports swapping the default primary key of models so > the integer exhaustion part of your suggestion should be addressed That's not particularly related. The issue isn't that there isn't any way to get a 64 bit key

Re: Increase default integer keys to 64 bits

2021-01-29 Thread charettes
As Tom said Django 3.2 supports swapping the default primary key of models so the integer exhaustion part of your suggestion should be addressed Regarding identity columns support there's already a ticket opened about it on Trac[0] where you might want to chime in. Even #30511 if doesn't land i

Re: Increase default integer keys to 64 bits

2021-01-28 Thread Tom Forbes
Better than that: 3.2 is the first step to changing the default. See “customising the type of primary keys” in the release notes (https://docs.djangoproject.com/en/dev/releases/3.2/). “GENERATED BY DEFAULT AS IDENTITY” would be a nice improvement though. Tom > On 29 Jan 2021, at 01:58, Curtis

Re: Increase default integer keys to 64 bits

2021-01-28 Thread Curtis Maloney
I recall a discussion some time about about adding a setting to control which field to use for the default PK... seems there's some overlap here. -- C On Fri, 29 Jan 2021, at 12:42, Christophe Pettus wrote: > tl;dr: Introduce new field types to handle auto-incremented ID fields, change > the P

Increase default integer keys to 64 bits

2021-01-28 Thread Christophe Pettus
tl;dr: Introduce new field types to handle auto-incremented ID fields, change the PostgreSQL backend to use the preferred syntax -- One of the most common issues my company runs into on Django sites is that models.AutoField defaults to a 32-bit integer (int32). 2^31-1 possible entries is just