Ticket #3778 (closed Bugs: invalid)

Opened 8 months ago

Last modified 7 months ago

asterisk-stat PostgreSQL substring()

Reported by: wing Assigned to:
Priority: minor Milestone: 2.6
Component: Reports Version: 2.5-branch
Keywords: pgsql Cc:
Confirmation: Confirmed SVN Revision (if applicable):
Backend Engine: Asterisk 1.6 Backend Engine Version:

Description

asterisk-stat, included in FreePBX 2.5.1 rises and error:

SELECT substring(calldate,1,10) AS day, sum(duration) AS calltime, count(*) as nbcall FROM cdr WHERE (calldate) >= ('2009-07-01') GROUP BY substring(calldate,1,10) [nativecode=ERROR: function pg_catalog.substring(timestamp with time zone, integer, integer) does not exist LINE 1: SELECT substring(calldate,1,10) AS day, sum(duration) AS cal... HINT: No function matches the given name and argument types. You might need to add explicit type casts.]

patch attached

Attachments

call-log.php_patch (0.7 kB) - added by wing on 07/07/09 04:42:14.

Change History

07/07/09 04:42:14 changed by wing

  • attachment call-log.php_patch added.

07/07/09 13:22:58 changed by p_lindheimer

  • confirmation changed from Unreviewed to Confirmed.

wing,

thanks. We don't really support postgres sql in FreePBX. The report code was imported from another project that obviously did thus the reason for all the posgres code.

However, we'll have a look at applying your patch to the code since if it is in the postgres code path there is no harm done and if it helps someone, we are happy for that. Will keep this open until someone has a chance to apply that and have a look.

08/23/09 13:29:57 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to invalid.

I may have glanced too quickly but in my quick glance I did not see this was limited to postgres so closing as invalid since postgres is not supported for 2.x (it is for 3.x)