After setting DatabaseFeatures.allows_group_by_selected_pks = False the 
"extra(select=...)" version still copies the expression to the "GROUP BY":

  GROUP BY (( SELECT json_agg(inseminacja.*) FROM inseminacja WHERE 
inseminacja.cow_life_number = animal.life_number )), ...


W dniu piątek, 4 marca 2016 22:28:16 UTC+1 użytkownik Simon Charette 
napisał:
>
> Hi Thomasz,
>
> I think this might be a bug in either your custom expressions or Django's
> GROUP BY handling on PostgreSQL.
>
> Can you try setting 
> `django.db.backends.postgresql.features.DatabaseFeatures.allows_group_by_selected_pks`
> to `False` and see if the appropriate GROUP BY clause is generated?
>
> Meanwhile I'll have a look at both your custom expressions to try to 
> identify
> the bug.
>
> Simon
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/042ebb01-4d40-4fba-9536-e4a1d478b7f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to