Closed (fixed)
Project:
Support Ticketing System
Version:
6.x-1.2-rc1
Component:
Charting
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Sep 2009 at 07:17 UTC
Updated:
13 Oct 2011 at 12:22 UTC
I have a question about support_charting. I installed the module chart API but I apparently SQL error type :
* user warning: query: SELECT COUNT(t.nid) AS count, s.state as label, s.isclosed FROM support_ticket t LEFT JOIN support_states s ON t.state = s.sid LEFT JOIN node n ON t.nid = n.nid WHERE n.status = 1 GROUP BY s.isclosed ORDER BY s.isclosed in /var/www/support/sites/all/modules/support/support_charts/support_charts.module on line 130.
* warning: pg_query() [function.pg-query]: Query failed: ERREUR: l'opérateur n'existe pas : smallint_unsigned = boolean LINE 1: ...N t.nid = n.nid WHERE n.status = 1 AND s.isclosed = FALSE G... ^ HINT: Aucun opérateur ne correspond au nom donné et aux types d'arguments. Vous devez ajouter des conversions explicites de type. in /var/www/support/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT COUNT(t.nid) AS count, s.state as label FROM support_ticket t LEFT JOIN support_states s ON t.state = s.sid LEFT JOIN node n ON t.nid = n.nid WHERE n.status = 1 AND s.isclosed = FALSE GROUP BY s.state ORDER BY s.state in /var/www/support/sites/all/modules/support/support_charts/support_charts.module on line 149.
* warning: pg_query() [function.pg-query]: Query failed: ERREUR: l'opérateur n'existe pas : smallint_unsigned = boolean LINE 1: ...N t.nid = n.nid WHERE n.status = 1 AND s.isclosed = FALSE G... ^ HINT: Aucun opérateur ne correspond au nom donné et aux types d'arguments. Vous devez ajouter des conversions explicites de type. in /var/www/support/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT COUNT(t.nid) AS count, p.priority as label FROM support_ticket t LEFT JOIN support_priority p ON t.priority = p.pid LEFT JOIN support_states s ON t.state = s.sid LEFT JOIN node n ON t.nid = n.nid WHERE n.status = 1 AND s.isclosed = FALSE GROUP BY t.priority ORDER BY t.priority in /var/www/support/sites/all/modules/support/support_charts/support_charts.module on line 168.
* warning: pg_query() [function.pg-query]: Query failed: ERREUR: l'opérateur n'existe pas : smallint_unsigned = boolean LINE 1: ...N t.nid = n.nid WHERE n.status = 1 AND s.isclosed = FALSE G... ^ HINT: Aucun opérateur ne correspond au nom donné et aux types d'arguments. Vous devez ajouter des conversions explicites de type. in /var/www/support/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT COUNT(t.nid) AS count, c.name as label FROM support_ticket t LEFT JOIN support_client c ON t.client = c.clid LEFT JOIN support_states s ON t.state = s.sid LEFT JOIN node n ON t.nid = n.nid WHERE n.status = 1 AND s.isclosed = FALSE GROUP BY t.client ORDER BY t.client in /var/www/support/sites/all/modules/support/support_charts/support_charts.module on line 187.
* warning: pg_query() [function.pg-query]: Query failed: ERREUR: l'opérateur n'existe pas : smallint_unsigned = boolean LINE 1: ...N t.nid = n.nid WHERE n.status = 1 AND s.isclosed = FALSE GR... ^ HINT: Aucun opérateur ne correspond au nom donné et aux types d'arguments. Vous devez ajouter des conversions explicites de type. in /var/www/support/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT COUNT(t.nid) AS count, u.name as label FROM support_ticket t LEFT JOIN users u ON t.assigned = u.uid LEFT JOIN support_states s ON t.state = s.sid LEFT JOIN node n ON t.nid = n.nid WHERE n.status = 1 AND s.isclosed = FALSE GROUP BY t.assigned ORDER BY t.assigned in /var/www/support/sites/all/modules/support/support_charts/support_charts.module on line 199.
* warning: pg_query() [function.pg-query]: Query failed: ERREUR: l'opérateur n'existe pas : smallint_unsigned = boolean LINE 1: ...port_states s ON t.state = s.sid WHERE s.isclosed = TRUE AND... ^ HINT: Aucun opérateur ne correspond au nom donné et aux types d'arguments. Vous devez ajouter des conversions explicites de type. in /var/www/support/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT GREATEST(n.changed, l.last_comment_timestamp) AS timestamp FROM node n LEFT JOIN node_comment_statistics l ON n.nid = l.nid LEFT JOIN support_ticket t ON n.nid = t.nid LEFT JOIN support_states s ON t.state = s.sid WHERE s.isclosed = TRUE AND n.type = 'support_ticket' AND (n.changed < 1253534745 OR l.last_comment_timestamp < 1253534745) AND (n.changed > 1251756000 OR l.last_comment_timestamp > 1251756000) ORDER BY timestamp in /var/www/support/sites/all/modules/support/support_charts/support_charts.module on line 293.An idea?
Thank you
Comments
Comment #1
jeremy commentedThe issue appears to be some queries that are incompatible with PostgreSQL. Unfortunately your errors are in a language that I am unable to read, so I'm not sure what the exact problem is. I'll need errors in English before I can debug this...
Comment #2
pcsystemd commentedThank you. Indeed it looks like problems with Postgresql functions.These are the errors in English in the hope that it may help you.
Thank's
Comment #3
jeremy commentedFix committed, using declared field type in query. Please re-open this issue if the errors don't go away even after this change.
Comment #4
jeremy commentedUpdating title for posterity.
Comment #5
pcsystemd commentedHello and thank you. I replaced the file by support_charts.module one you Comitted with your changes but I still have some SQL errors.
Comment #6
jeremy commentedRe-opening bug report.
Comment #7
pcsystemd commentedOk thank's.
Comment #8
jeremy commentedI'm not actually sure how to rewrite these queries that will work with PostgreSQL. I could replace the single query with multiple queries perhaps, but that changes the overall logic a fair bit. If someone wants to contribute a patch to make these queries work with PostgreSQL, that would be greatly appreciated.
(Simply adding the c.state field to the GROUP BY, in the first error for example, completely changes the resulting data.)
Comment #9
pcsystemd commentedWell if I migrate my database is in Postgresql to Mysql. It would be desirable for future users of your module support_charts report that does not support Postgresql yet.
Otherwise your module is wonderful.
Thank you
Comment #10
augneL Developer commentedHello,
yesterday i was working in this issue. I downloaded the cvs version and modify the sql sentence.
I have modify the chart Api module, because it have a problem to.
Now this two module work well for postgresql. I don't test for mysql but i think work well. This two modules now are working in our company.
Do you want this change?
Comment #11
jeremy commentedThe best thing to do would be to post a patch for the support_charting module here, and another patch for the chart api module in the chart api issue queue.
Comment #12
pcsystemd commentedThank's for the patch.
Comment #13
jeremy commentedIf this is still an issue, please re-open with a patch.