From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | StOo <stuart(at)comodo(dot)net> |
Cc: | "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgreSQL(dot)org> |
Subject: | Re: [INTERFACES] guess what its int 64 time again. |
Date: | 1999-04-09 13:59:45 |
Message-ID: | 29432.923666385@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
StOo <stuart(at)comodo(dot)net> writes:
> Im trying to store 8byte information in char form on the database now
> so i can memcpy it back to a int64 when returning a tuple. But all my
> current attempts seem to fail beacuse i cant get the data stored
> correctly.im using PQexec to senddown a sql command string built by an
> sprintf , which is causing part of my problem as you have to display
> the data as %i %c %s etc and that where it shags up.
Huh?
As far as a user program goes, int8 acts just like any other integer
type: you pass it to and from libpq in the form of an ASCII digit
string. Perhaps you're misusing sprintf --- most platforms require
either "%lld" or "%qd" to format a long long int.
Also, you should check whether 'configure' built the int8 support
at all --- the 6.4.* version of configure is not very bright about
coping with all the various variants of 64-bit-int support on different
platforms. (6.5 is much smarter.) Does the int8 regression test pass
for you?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Sergio | 1999-04-09 14:19:11 | Re: [INTERFACES] ODBC Driver v06-40-0005 |
Previous Message | Michael Davis | 1999-04-09 13:18:54 | RE: [INTERFACES] 6.5beta1 configure error "host type unrecogized" on linux2.0.34_i486 |