Re: timestamps, formatting, and internals

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: timestamps, formatting, and internals
Date: 2012-06-02 06:57:24
Message-ID: jqcdgk$puj$2@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2012-05-29, David Salisbury <salisbury(at)globe(dot)gov> wrote:
>
>
> On 5/27/12 12:25 AM, Jasen Betts wrote:
>> The query: "show integer_datetimes;" should return 'on' which means
>> timestamps are microsecond precision if it returns 'off' your database
>> was built with floating point timstamps and equality tests will be
>> unreliable,
>
> I find that rather interesting. I was told that I was losing microseconds
> when I extracted an epoch from the difference between two timestamps and casted
> that value to an integer. So if I have integer timestamps ( your case above )
> I get microseconds, but integer epochs is without microseconds?

yeah, the microseconds appear as fractions of seconds, so in the
conversion to integer epoch they get rounded off.

>
> Thanks,
>
> -ds
>

--
⚂⚃ 100% natural

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2012-06-02 07:06:38 Re: timestamps, formatting, and internals
Previous Message Jasen Betts 2012-06-02 06:48:56 Re: Disable Streaming Replication without restarting either master or slave