[asterisk-bugs] [JIRA] (ASTERISK-24283) Microseconds precision in the eventtime column in the cel_odbc module

Etienne Lessard (JIRA) noreply at issues.asterisk.org
Thu Aug 28 14:39:29 CDT 2014


Etienne Lessard created ASTERISK-24283:
------------------------------------------

             Summary: Microseconds precision in the eventtime column in the cel_odbc module
                 Key: ASTERISK-24283
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24283
             Project: Asterisk
          Issue Type: Improvement
      Security Level: None
          Components: CEL/cel_odbc
    Affects Versions: 11.11.0
            Reporter: Etienne Lessard
            Severity: Minor
         Attachments: xivo_cel_odbc_time_precision

In the cel_odbc.conf.sample file, it's written:

{noformat}
...
;	  FORWARD = 25
;	eventtime  (timeval, includes microseconds)
;	userdeftype (set only if eventtype == USER_DEFINED)
...
{noformat}

That said, if you use cel_odbc to store CEL in a table where the eventtime column is of timestamp type, you'll only get second precision, i.e. you won't have sub-second precision.

The attached patch fix that. Tested on asterisk 11.11.0 with a postgresql 9.1 DBMS with a CEL table with the eventtime column of type timestamp.

Also, if you were using an eventtime column of type varchar, I believe the patch will also increase the precision of the data stored; you'll go from millisecond precision to microsecond precision. That said, personally, it would be fine to have millisecond precision; microsecond precision is not really important. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list