Github user kaspersorensen commented on the pull request:

    https://github.com/apache/metamodel/pull/59#issuecomment-149039177
  
    OK a bit more research and coding done ...
    
    FIrst of all, we still missed one half of the problem, so I did that: The 
timestamps that are inserted where wrongly re-created and that made them loose 
their nano-second precision. So I've changed that in 
JdbcUtils.setStatementValue(...)
    
    The other thing I would want to report is that since I know you faced this 
issue in PostgreSQL, I wanted to test specifically on that database - hence the 
update to PostgresqlTest. BUT I must say that my finding was a bit 
dissapointing. It seems that the PostgreSQL driver has sub-nanosecond 
precision. To be precise it "only" has precision of a 1000th of a millisecond. 
Several sources explain that this is an issue with how the database formats the 
output when sending it to JDBC [1] and I couldn't find any solutions to the 
problem that didn't involve compiling PostgreSQL yourself(!). Apparently the 
microsecond precision that they claim to have is only in the storage layer. The 
issue can also be seen in simple pgAdmin usage:
    
    
![image](https://github-cloud.s3.amazonaws.com/assets/291450/10565850/2977bda0-75db-11e5-9fd6-d8c6e90b845d.png)
    
    The above fraction-of-second numbers are only 6 digit while a nano would be 
9 digit.
    
    As a result, the PostgresqlTest only does assertions on 
millisecond-precision.
    
    [1] 
http://www.postgresql.org/message-id/[email protected]


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to