precision of epoch

From: g(dot)hintermayer(at)inode(dot)at
To: pgsql-general(at)postgresql(dot)org
Subject: precision of epoch
Date: 2007-06-14 11:40:12
Message-ID: 1181821212.615950.162980@i38g2000prf.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'd like to convert timestamps without timezone to unix epoch values
with at least microseconds resolution.
but when i do e.g.:
select extract (epoch from timestamp without time zone 'Thu 14 Jun
05:58:09.929994 2007');

i get:
1181793489.92999

so i loose the last digit. I'd expect 1181793489.929994

That's as well the behaviour, when I use columns of a real table. I
seached the docs for a precsion value and even tried timestamp(6) as
well but with no success. What am I missing here ?

Gerhard

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2007-06-14 11:47:30 Re: how to speed up query
Previous Message Martijn van Oosterhout 2007-06-14 11:14:03 Re: [SQL] function to find difference between in days between two dates