Hi list,

I'm trying to find out, from a client, how many characters will fit in a varchar field (http://pgfoundry.org/tracker/index.php?func=detail&aid=1000286&group_id=1000085&atid=394). Problem is that when I do "PQfmod" on a varchar field defined as "varchar(20)", PQfmod returns "24".

Now, it's fairly easy for me to subtract 4 from each result I get from PQfmod, but I have a suspicion that this "4" is actually "pointer's length", which means that I need to detect a 64 bit server and subtract 8 instead.

1. Is this suspicion correct?
2. If so, how do I detect how much to subtract.
3. If not, what is the meaning of "4"?

Thanks,
         Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting ltd.
Have you backed up today's work? http://www.lingnu.com/backup.html


---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings

Reply via email to