openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Holloway (JIRA)" <>
Subject [jira] Commented: (OPENJPA-638) Timestamp unsuitable for versioning on PostgreSQL databases
Date Sat, 28 Jun 2008 12:53:44 GMT


Tim Holloway commented on OPENJPA-638:

This problem can be mitigated by defining the database field as being of type timestamp(0),
which limits the timestamp's precision to an integral number of seconds.

> Timestamp unsuitable for versioning on PostgreSQL databases
> -----------------------------------------------------------
>                 Key: OPENJPA-638
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: docs
>         Environment: PostgreSQL ca Version 8, Section 2.17 of the Apache OpenJPA User's
>            Reporter: Tim Holloway
> PostgreSQL can store objects in its native timestamp in a format determined by PostgreSQL
build options. By default, the postgresql timestamp is a double-precision floating-point number
with maximum precision of 6 digits (see section 8.4 of the PostgreSQL 8.2.7 documentation).
java.sql.Timestamp extends java.util.Date, and thus stores data in long integer milliseconds.
The resulting value mismatch can cause optimistic updates to fail.
> See also Jira issue OpenJPA-636.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message