#30332: Postgres ordering ARRAY_AGG and STRING_AGG do not support expression.
-------------------------------------+-------------------------------------
     Reporter:  simone6021           |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  2.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  postgres string_agg  |             Triage Stage:
  array_agg ordering order by        |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by simone6021:

Old description:

> I found that if you pass and expression as an ordering argument an {{{
> IndexError: tuple index out of range }}} exception will be thrown when
> the query is executed.
>
> This is caused by simply ignoring {{{ sql_params }}} returned from {{{
> as_sql }}} elements contained in passed {{{ ordering }}} argument.

New description:

 I found that if you pass and expression as an ordering argument
 (introduced in
 
https://github.com/django/django/commit/96199e562dcc409ab4bdc2b2146fa7cf73c7c5fe)
 an {{{ IndexError: tuple index out of range }}} exception will be thrown
 when the query is executed.

 This is caused by simply ignoring {{{ sql_params }}} returned from {{{
 as_sql }}} elements contained in passed {{{ ordering }}} argument.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30332#comment:1>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.97a91c8e1036be74ae3d0e0d7d3a7497%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to