Just a suggestion check out the Pure Perl PostgreSQL driver ppgsql package they coded 
around numerous quirks in pgsql.

Kevin


-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



 --- On Tue 10/05, Frank D. Engel, Jr. < [EMAIL PROTECTED] > wrote:
From: Frank D. Engel, Jr. [mailto: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Date: Tue, 5 Oct 2004 09:37:24 -0400
Subject: Why?

Okay, so I got tired of waiting for RevDB to be fixed for PostgreSQL <br>(or for some 
explanation of how to set it up, in case my drivers are <br>not correctly positioned), 
so I am trying to write my own, <br>Transcript-native PostgreSQL driver for Rev (with 
its own API, by means <br>of a 'start using' command...)  Never tried this before, but 
I did get <br>the 'start using' to work.<br><br>I *think* I was able to get sockets 
working, too, but for some reason, <br>at least under OS X, I cannot seem to read from 
a socket.  What am I <br>doing wrong here?  I have the following handler in my 
code:<br><br>function pgFetchMessage<br>   read from socket pg_sock for 5<br>   put it 
into x<br>   put (charToNum(char 2 of x) * 16777216) + (charToNum(char 3 of x) * 
<br>65536) + (charToNum(char 4 of x) * 256) + charToNum(char 5 of x) \<br>       into 
l<br>   read from socket pg_sock for l<br>   put it into z<br>   answer charToNum(the 
first char of x) titled (pg_sock) && (the length <br>o
 f x)<br>   return (x & z)<br>end pgFetchMessage<br><br><br>The "answer" line results 
in the following title bar (empty message):<br><br>localhost:5432 0<br><br>Why would 
this happen?  That "0" means that the length of string "x" <br>(which should contain 
exactly five characters, right?) is zero.  In <br>other words, that string is empty -- 
but it shouldn't be!<br><br>Somehow I was able to get it to register a message with 
the letter "O" <br>out in front, when I was expecting to get an "R" from the server.  
I <br>went over the protocol docs to figure out what would cause a message 
<br>starting with "O", and there was no message starting with "O" in the <br>docs.  
Strange...<br><br>I am reasonably convinced (given the handler below) that I am not 
<br>getting a socketError (the "err!" box never shows up; pg_wantsock <br>contains the 
same text as pg_sock by now):<br><br>on socketError sock, errmsg<br>   if sock is 
pg_wantsock then<br>     put empty into pg_sock<br>     put errms
 g into pg_err<br>   end if<br>   answer "err!" & errmsg<br>end 
socketError<br><br><br>So what could be 
happening?<br><br><br>-----------------------------------------------------------<br>Frank
 D. Engel, Jr.  <[EMAIL PROTECTED]><br><br>$ ln -s /usr/share/kjvbible 
/usr/manual<br>$ true | cat /usr/manual | grep "John 3:16"<br>John 3:16 For God so 
loved the world, that he gave his only begotten <br>Son, that whosoever believeth in 
him should not perish, but have <br>everlasting life.<br>$ 
<br>_______________________________________________<br>use-revolution mailing 
list<br>[EMAIL 
PROTECTED]<br>http://lists.runrev.com/mailman/listinfo/use-revolution<br>

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to