Some more detail:

When odbx_result() fails in this scenario, it gives an error code without 
giving me a result handle (i.e., the returned odbx_result_t is NULL).  That 
prevents me from calling odbx_result_finish() in a useful way, which in turn 
leaves the underlying database handle in an unusable state.  This appears to be 
unrecoverable.

This is with opendbx 1.4.5 on FreeBSD.

-MSK


From: Murray S. Kucherawy [mailto:[email protected]]
Sent: Wednesday, June 15, 2011 1:14 PM
To: [email protected]
Subject: [opendbx] More fun with postgresql

I'm having a problem with an error code returned by postgresql via opendbx.  I 
think I have my use of the API right, so this seems like it might be another 
interesting defect in libpq, but I want to check here to make sure.

I'm sending a query that contains some high-bit ASCII characters in it, namely 
0xE1 and 0xF3.  Postgresql responds with:


ERROR:  invalid byte sequence for encoding "UTF8": 0xe17469 HINT:  This error 
can also happen if the byte sequence does not match the encoding expected by 
the server, which is controlled by "client_encoding".



The sequence of calls is:



odbx_escape(), returns successfully

odbx_query(), returns successfully

odbx_result(), fails

odbx_error_type() returns 1 (non-fatal)

odbx_result_finish()



Then later, with the same odbx_t handle, odbx_query() still fails, reporting 
"another command is already in progress".  Is calling odbx_result_finish() here 
not enough?



-MSK


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
libopendbx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
http://www.linuxnetworks.de/doc/index.php/OpenDBX

Reply via email to