Re: Timestamp precision in Windows and Linux

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Shruthi A <shruthi(dot)iisc(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Timestamp precision in Windows and Linux
Date: 2009-12-28 14:49:49
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Shruthi A <shruthi(dot)iisc(at)gmail(dot)com> writes:
> The page
> that the resolution of all time and timestamp data types is 1
> microsecond. I have an application that runs on both a Windows (XP with
> SP2) machine and a Linux (SUSE 10.2) machine. I saw that on postgres
> enterprisedb 8.3 installed on both these machines, the default timestamp
> precision on the former is upto a millisecond and on the latter it is 1
> microsecond.

I suppose what you're really asking about is not the precision of the
datatype but the precision of now() readings. You're out of luck ---
Windows just doesn't expose a call to get the wall clock time to better
than 1 msec.

Keep in mind that whatever the Linux machine is returning might be
largely fantasy in the low-order bits, too.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2009-12-28 18:56:02 Re: Database performance problems
Previous Message Salman Khan 2009-12-28 11:48:42 Re: ERROR: syntax error at or near "group"