Mark Gibson wrote:
I've found the problem, although I'm still a bit confused by it.
I hate to do this to you now, but after some thought I think I have a better approach -- I'd be interested in opinions on that assessment.
The attached eliminates pgresultGetTupleDesc() entirely and instead depends on the TupleDesc passed as rsinfo->expectedDesc from the executor. What this means is that the string representation of the remote value (from the "out" function on the remote side, as provided by libpq) will get fed into the "in" function corresponding to the local type you assign in your SQL statement. Assuming the types on the two sides are the same (or at least compatible), it should work well.
Please give this a try and let me know what you think.
Fantastic, works perfectly (well I've only actually tested it with the 'txtidx' datatype).
That's so much better than my idea, i didn't like having the oid map much anyway.
Oh well, I least I've learnt I little about PostgreSQL internals in the process.
I can get back to what I was supposed to be doing now ;)
I'm going to give this a much through testing now.
Cheers
-- Mark Gibson <gibsonm |AT| cromwell |DOT| co |DOT| uk> Web Developer & Database Admin Cromwell Tools Ltd. Leicester, England.
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly