Informix 4GL Bug Impacting Datetime Fields
Posted in 1996
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Security, Permissions & Auditing
I came across an interesting problem that may be of concern to other Informix 4GL developers. Assume that you define a datetime value with a granularity of fractional seconds, for example: datetime(year to fraction) The only tool available within 4GL to get the time of day is the 4GL "current" function, but don't expect to get a time value from the 4GL "current" function with granularity more accurate than whole seconds. The "current" function will never return a value other than zero for the fractional part of the second. This was explained away by Informix tech support as a "Known Bug" impacting all platforms/ports, but there is no known date or revision for a fix. It follows that: 1) All examples in Informix documentation showing fractional seconds are bogus. 2) Any attempt to calculate an interval will only show differences to the level of whole seconds. 3) Any use of a datetime field including fractional seconds in a schema is a waste of disc space. Since it is easy to accomplish two different operations on a record in less than a second, any logs or homebrew audit trails that attempt to use fractional seconds may present some confusion over the exact order of changes made. Informix tech support has yet to answer my question about the implications for "real" Informix Audit Trails. More when they do. I used to Kick Butt, but now I Click Butt james fischer jfischer@supercollider.com