Project

General

Profile

Development #38932

Manque de parenthèses autour d'une expression JSON

Added by Benjamin Dauvergne 8 days ago. Updated 4 days ago.

Status:
Solution déployée
Priority:
Normal
Target version:
-
Start date:
13 Jan 2020
Due date:
% Done:

0%

Patch proposed:
Yes
Planning:
No

Description

L'associativité de IS NULL est plus forte que celle de ->>.

0001-engine-add-missing-parenthesis-around-operator-38932.patch View (1.17 KB) Benjamin Dauvergne, 13 Jan 2020 04:05 PM

0001-engine-add-missing-parenthesis-around-operator-38932.patch View (953 Bytes) Benjamin Dauvergne, 14 Jan 2020 03:29 PM

Associated revisions

Revision 126ddfa8 (diff)
Added by Benjamin Dauvergne 7 days ago

engine: add missing parenthesis around ->> operator (#38932)

History

#2 Updated by Benjamin Dauvergne 8 days ago

  • Assignee set to Benjamin Dauvergne

#3 Updated by Benjamin Dauvergne 8 days ago

#4 Updated by Benjamin Dauvergne 8 days ago

À valider en live à Villeurbanne.

#5 Updated by Serghei Mihai 8 days ago

SQL:

SELECT EXTRACT(month from receipt_time.date) AS receipt_time__month_value, to_char(date_trunc(\'month\', receipt_time.date), \'TMmonth\') AS receipt_time__month_label, "json_resultat_stat".value AS resultat_stat_value, "json_resultat_stat".value AS resultat_stat_label, count(formdata.id) AS count FROM formdata LEFT OUTER JOIN  (SELECT DISTINCT formdata.json_data->>\'resultat_stat\' AS value FROM formdata WHERE (formdata.json_data->>\'resultat_stat\') IS NOT NULL ORDER BY value) AS "json_resultat_stat" ON formdata.(json_data->>\'resultat_stat\') = "json_resultat_stat".value RIGHT OUTER JOIN  dates AS "receipt_time" ON formdata.receipt_time = "receipt_time".date WHERE receipt_time.date >= \'2020-01-01\'::date AND receipt_time.date < \'2021-01-01\'::date GROUP BY EXTRACT(month from receipt_time.date), to_char(date_trunc(\'month\', receipt_time.date), \'TMmonth\'), "json_resultat_stat".value, EXTRACT(month from receipt_time.date) ORDER BY EXTRACT(month from receipt_time.date), "json_resultat_stat".value

et:
ERREUR:  erreur de syntaxe sur ou près de « ( »
LINE 1: ...DER BY value) AS "json_resultat_stat" ON formdata.(json_data...

#6 Updated by Benjamin Dauvergne 8 days ago

Ok j'ai mis des parenthèses en trop maintenant, je corrige tout à l'heure.

#8 Updated by Serghei Mihai 7 days ago

  • Status changed from Solution proposée to Solution validée

#9 Updated by Benjamin Dauvergne 7 days ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 126ddfa812bf9270114d6782d40a69e6b92b43cf
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Mon Jan 13 16:04:43 2020 +0100

    engine: add missing parenthesis around ->> operator (#38932)

#10 Updated by Frédéric Péters 4 days ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF