Thread: C program Postgres 6.3 and date

C program Postgres 6.3 and date

From
Roberto Taglioretti
Date:
Hello,
first thing of note is that if it is possible
I prefer to receive email with the solution.
I recently upgraded postgres from version ~6 to 6.3.  Unfortunately,
where before I had everything passed back as text strings now things are

being passed back in their binary form.

My question is
How is the postgres date type stored in C?Is it an integer in seconds from a specific date?How would I convert it to a
textstring of the form 05-21-1998?(When I print it as an integer I get 841823536)Before I received that text string as
aresult of the PQgetvalue now
 
I am getting the binary form and I can't find a reference on how to
convert
back.

Thanks        Roberto Taglioretti



--

_____________

Taglioretti Roberto (roberto@gass.it)

our sites:
http://www.gass.it
http://www.gassnet.net
http://www.itbusiness.com
http://www.immagini.it

our legal address:
GASS s.a.s di Grampa M. e Taglioretti R. & C.
Via delle Cascine 38
21041 Albizzate (VA) ITALY
P.I. 02290890124
Telephone +39(0)331 985251
Fax       +39(0)331 984497

our operative site address:
GASS s.a.s di Grampa M. e Taglioretti R. & C.
Via Col Di Lana 18
21041 Albizzate (VA) ITALY
P.I. 02290890124




Re: [INTERFACES] C program Postgres 6.3 and date

From
Thomas Lockhart
Date:
> I recently upgraded postgres from version ~6 to 6.3.  Unfortunately,
> where before I had everything passed back as text strings now things 
> are being passed back in their binary form.

(I'm not sure if you already got a response)

You should be seeing text, not binary data. Although v6.3 shouldn't
have any particular problem with this, I would suggest upgrading to
v6.4.2 asap and make sure that any apps you have are using the new
libraries.

Good luck.
                       - Tom

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California