Unfortunately the postgresql timestamp type only can store timestamps with microsec precision but i need the nanosec also.
PostgreSQL - 8.5. Date/Time Types:
Timestamp, and interval accept an optional precision value p which specifies the number of fractional digits retained in the seconds field. By default, there is no explicit bound on precision. The allowed range of p is from 0 to 6 for the timestamp and interval types.
And i need 7:
0,000 000 001 [ billionth ] nanosecond [ ns ]
0,000 001 [ millionth ] microsecond [ µs ]
0,001 [ thousandth ] millisecond [ ms ]
0.01 [ hundredth ] centisecond [ cs ]
1.0 second [ s ]
Is there any elegant and efficient way to handle this problem?
EDIT: Maybe store the timestamp in bigint?