Re: Datefield and timefield rendered as textfield

2021-12-04 Thread Hannes Ljungberg
Hi Vishal, See this discussion for more details on the topic - https://groups.google.com/g/django-developers/c/wp-pnzcB25o/m/D5gEOzPIAQAJ Best, Hannes lördag 4 december 2021 kl. 21:45:59 UTC+1 skrev vishalpan...@gmail.com: > Hi everyone, > I wanted to know why Django renders datefield and time

Re: Create indexes with expression using UniqueConstraint

2021-07-01 Thread Hannes Ljungberg
Hi! Support for using expressions on UniqueConstraints will be available in Django 4.0: https://docs.djangoproject.com/en/dev/releases/4.0/#functional-unique-constraints torsdag 1 juli 2021 kl. 15:23:21 UTC+2 skrev wladimir@gmail.com: > Hello, > First of all, you've being doing a great wo

Re: About the ORM icontains operator's disadvantage on PostgreSQL performance and query results.

2021-03-01 Thread Hannes Ljungberg
I kind of agree that using `UPPER` instead of `ILIKE` for `__icontains` on PostgreSQL isn’t optimal. But it is quite easy to create a functional trigram GIN-index which use `UPPER` to allow these lookups to use an index. This will be even easier in Django 3.2 where you can create functional ind

Re: Proposal to not implicitly create varchar/text-pattern opclass indexes on PostgreSQL

2020-04-14 Thread Hannes Ljungberg
app >>> django-oauth-toolkit: >>> https://github.com/jazzband/django-oauth-toolkit/blob/master/oauth2_provider/models.py#L284 >>> >>> . >>> The other indexes are on small tables and I'm not concerned about them >>> from a performanc

Re: Proposal to not implicitly create varchar/text-pattern opclass indexes on PostgreSQL

2020-04-14 Thread Hannes Ljungberg
are removed > without a developer realizing it. > > Third-party apps that need it could add an Index with opclasses but then > they'd face the issue of duplicate opclasses indexes if their app is used > on an older version of Django. > > * https://github.com/django/dj

Proposal to not implicitly create varchar/text-pattern opclass indexes on PostgreSQL

2020-04-12 Thread Hannes Ljungberg
Hi all, I would like to continue the discussion started in this very old thread: https://groups.google.com/d/msg/django-developers/H2QFcQYsbo8/RmRb-8FVypwJ I’m sorry if I should've continued the discussion in that thread but it felt a bit wrong to bring a 5 year old thread back to life :-) Any

Re: Proposal: Add simply way to use upper index in Meta.models.indexes

2020-04-03 Thread Hannes Ljungberg
Hi Pavel, I think this is best solved by adding support for indexes on expressions. This would allow for indexes to be defined as: class Meta: indexes = [ Index(fields=[Upper('name')], name='upper_name_idx') ] There's an open ticket for this https://code.djangoproject.com/ticke