Re: [Django] #34860: Order_by is broken when sorting on an annotated postgres window function value

2023-09-21 Thread Django
#34860: Order_by is broken when sorting on an annotated postgres window function
value
-+-
 Reporter:  Bernhard Mäder   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  Window Postgres  | Triage Stage:
  order_by   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Bernhard Mäder):

 Well d'uh, my bad, I wasn't aware of the postgres syntax with just the
 "3". I was just looking at the SQL syntax.

 Sorry for the hassle! And thank you for clarifying!

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018ab7e39ec2-57be0bbb-ad1f-4f31-9e3e-2ac500e05a1b-00%40eu-central-1.amazonses.com.


Re: [Django] #34860: Order_by is broken when sorting on an annotated postgres window function value

2023-09-21 Thread Django
#34860: Order_by is broken when sorting on an annotated postgres window function
value
-+-
 Reporter:  Bernhard Mäder   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  Window Postgres  | Triage Stage:
  order_by   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by David Sanders):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Closing pending further clarification…

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018ab7c0cd5d-29274b12-88eb-4906-9401-f6421edf32ad-00%40eu-central-1.amazonses.com.


Re: [Django] #34860: Order_by is broken when sorting on an annotated postgres window function value

2023-09-21 Thread Django
#34860: Order_by is broken when sorting on an annotated postgres window function
value
-+-
 Reporter:  Bernhard Mäder   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  4.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:  Window Postgres  | Triage Stage:
  order_by   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by David Sanders):

 Is there some context missing here? From the details you've given, it is
 sorting by rank 樂

 {{{
 sample=# table ticket_34860_window_order_by_a;
  id | a
 +---
   1 | a
   2 | b
   3 | c
   4 | b
 (4 rows)

 sample=# SELECT "ticket_34860_window_order_by_a"."id",
"ticket_34860_window_order_by_a"."a",
count('id') OVER (PARTITION BY
 "ticket_34860_window_order_by_a"."a") AS "rank"
 FROM "ticket_34860_window_order_by_a"
 ORDER BY 3 ASC ;
  id | a | rank
 +---+--
   1 | a |1
   3 | c |1
   2 | b |2
   4 | b |2
 (4 rows)
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018ab7bfb62e-b0592587-3e5a-4cc7-a35b-5209cbe8e5f9-00%40eu-central-1.amazonses.com.