pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
C program Postgres 6.3 and date
5+ messages / 2 participants
[nested] [flat]

* C program Postgres 6.3 and date
@ 1999-05-02 21:36  Roberto Taglioretti <roberto@gass.it>
  0 siblings, 0 replies; 5+ messages in thread

From: Roberto Taglioretti @ 1999-05-02 21:36 UTC (permalink / raw)
  To: pgsql-interfaces

Hello,
first thing of note is that I'm not on the list so please email
solutions to me.
 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 text string of the form 05-21-1998?
 (When I print it as an integer I get 841823536)
 Before I received that text string as a result 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





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* C program Postgres 6.3 and date
@ 1999-05-02 21:46  Roberto Taglioretti <roberto@gass.it>
  0 siblings, 0 replies; 5+ messages in thread

From: Roberto Taglioretti @ 1999-05-02 21:46 UTC (permalink / raw)
  To: pgsql-interfaces

Hello,
first thing of note is that I'm not on the list so please email
solutions to me.
 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 text string of the form 05-21-1998?
 (When I print it as an integer I get 841823536)
 Before I received that text string as a result 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





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* C program Postgres 6.3 and date
@ 1999-05-02 21:54  Roberto Taglioretti <roberto@gass.it>
  0 siblings, 1 reply; 5+ messages in thread

From: Roberto Taglioretti @ 1999-05-02 21:54 UTC (permalink / raw)
  To: pgsql-interfaces

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 text string of the form 05-21-1998?
 (When I print it as an integer I get 841823536)
 Before I received that text string as a result 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





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* C program Postgres 6.3 and date
@ 1999-05-03 05:00  Roberto Taglioretti <roberto@gass.it>
  0 siblings, 0 replies; 5+ messages in thread

From: Roberto Taglioretti @ 1999-05-03 05:00 UTC (permalink / raw)
  To: pgsql-interfaces


Hello,
first thing of note is that I'm not on the list so please email
solutions to me.
 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 text string of the form 05-21-1998?
 (When I print it as an integer I get 841823536)
 Before I received that text string as a result 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





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [INTERFACES] C program Postgres 6.3 and date
@ 1999-05-11 17:11  Thomas Lockhart <lockhart@alumni.caltech.edu>
  parent: Roberto Taglioretti <roberto@gass.it>
  0 siblings, 0 replies; 5+ messages in thread

From: Thomas Lockhart @ 1999-05-11 17:11 UTC (permalink / raw)
  To: Roberto Taglioretti <roberto@gass.it>; +Cc: pgsql-interfaces

> 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



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~1999-05-11 17:11 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-05-02 21:36 C program Postgres 6.3 and date Roberto Taglioretti <roberto@gass.it>
1999-05-02 21:46 C program Postgres 6.3 and date Roberto Taglioretti <roberto@gass.it>
1999-05-02 21:54 C program Postgres 6.3 and date Roberto Taglioretti <roberto@gass.it>
1999-05-11 17:11 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
1999-05-03 05:00 C program Postgres 6.3 and date Roberto Taglioretti <roberto@gass.it>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox