Re: dblink - custom datatypes NOW work :)
От | Mark Gibson |
---|---|
Тема | Re: dblink - custom datatypes NOW work :) |
Дата | |
Msg-id | 4030A07E.9050009@cromwell.co.uk обсуждение исходный текст |
Ответ на | Re: dblink - custom datatypes NOW work :) (Joe Conway <mail@joeconway.com>) |
Список | pgsql-hackers |
Joe Conway wrote: > 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.
В списке pgsql-hackers по дате отправления: