Timestamp precision in Windows and Linux

--0003255735d287b50b047bc3eee9
Content-Type: text/plain; charset=ISO-8859-1

Hi,

The page http://www.postgresql.org/docs/7.2/static/datatype-datetime. htmlmentions
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.

My curiosity is : is this a universal phenomenon ie a basic issue with
Windows? Or could there be some hardware or architectural differences or
something else...
And my problem is: is there any way to enforce a higher precision in
Windows? Because my application badly needs it.

Please help / guide.

Thanks a million,
Shruthi

--0003255735d287b50b047bc3eee9
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,<br><br>The page <a href=3D"http://www.postgresql.org/docs/7.2/static/da=
tatype-datetime.html">http://www.postgresql.org/docs/7.2/sta tic/datatype-da=
tetime.html</a> mentions that the resolution of all time and timestamp data=
types is 1 microsecond.=A0=A0 I have an application that runs on both a Wi=
ndows (XP with SP2) machine and a Linux (SUSE 10.2) machine.=A0=A0 I saw th=
at on postgres enterprisedb 8.3 installed on both these machines, the defau=
lt timestamp precision on the former is upto a millisecond and on the latte=
r it is 1 microsecond.<br>
<br>My curiosity is : is this a universal phenomenon ie a basic issue with =
Windows?=A0 Or could there be some hardware or architectural differences or=
something else...=A0=A0 <br>And my problem is: is there any way to enforce=
a higher precision in Windows?=A0 Because my application badly needs it.<b=
r>
<br>Please help / guide.<br><br>Thanks a million,<br>Shruthi<br>

--0003255735d287b50b047bc3eee9--
Shruthi A [ Mo, 28 Dezember 2009 07:22 ] [ ID #2027242 ]

Re: Timestamp precision in Windows and Linux

Shruthi A <shruthi.iisc [at] gmail.com> writes:
> The page http://www.postgresql.org/docs/7.2/static/datatype-datetime. htmlmentions
> 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

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Tom Lane [ Mo, 28 Dezember 2009 15:49 ] [ ID #2027248 ]
Datenbanken » gmane.comp.db.postgresql.admin » Timestamp precision in Windows and Linux

Vorheriges Thema: Database performance problems
Nächstes Thema: Re: ERROR: syntax error at or near "group"