#36407: Query compiler optimizes CASE..WHEN into a programming error on 
Postgres 16
-------------------------------------+-------------------------------------
     Reporter:  deceze               |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):

 This relates to #26192 (''Cannot order query by constant value on
 PostgreSQL'').

 The problem here is effectively that the `Case.as_sql`'s `not case_parts`
 should consider `isinstance(self.default, Value)` and use `Cast` like it
 was done in f6075fb333bae29ee213b050e91eaadef75496dd if it's the case.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36407#comment:2>
Django <https://code.djangoproject.com/>
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070196f8620a3c-815a8059-09bb-486b-8bd1-6baf367f3107-000000%40eu-central-1.amazonses.com.

Reply via email to