Timestamp format question

Started by Carlos Guzmán Álvarezover 21 years ago3 messages
#1Carlos Guzmán Álvarez
carlosga@telefonica.net

Hello:

A user of the PgSqlClient ADO.NET provider is having problems
when with timestamp and time values, he has a postgres 7.4.1
postgres install in a Suse machine.

The provider works implements v3.0 of the postgres protocol handling
timestamp andtime in binary format, the problem seems to be that the
server is sending the timestamp value encoded as an Int64, but when
running the same test against the postgresql snapshot for win32 the
value seems to be encoded as a double :-\ (i have run the same test
postgres 7.4.2 on Fedora Core 1 and seem s to be sending it encoded
as a double)

What is the supposed format that should be expected for time and
timestamp values in binary format ??

There are any way to retrieve the value encoded always in the same
way ?? or i'm making something really bad ?? :)

--
Best regards

Carlos Guzm�n �lvarez
Vigo-Spain

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Carlos Guzmán Álvarez (#1)
Re: Timestamp format question

=?ISO-8859-1?Q?Carlos_Guzm=E1n_=C1lvarez?= <carlosga@telefonica.net> writes:

What is the supposed format that should be expected for time and
timestamp values in binary format ??

Depends whether you built the server with --enable-integer-timestamps
or not.

There are any way to retrieve the value encoded always in the same
way ?

Sure: don't use binary I/O.

regards, tom lane

#3Carlos Guzmán Álvarez
carlosga@telefonica.net
In reply to: Tom Lane (#2)
Re: Timestamp format question

Hello:

Depends whether you built the server with --enable-integer-timestamps
or not.

Thanks :)

Sure: don't use binary I/O.

hehe ... :-\ .... i will do ... thanks again :)

--
Best regards

Carlos Guzm�n �lvarez
Vigo-Spain