Thanks for the tips of using gdb.Well, I've re-compiled PostgreSQL 7.4.1 with --enable-debug (was previously working with a Gentoo ebuild of it). And strangely I get a different error now:
ERROR: query-specified return row and actual function return row do not match
After placing a few elog statements around pgresultGetTupleDesc, i've found the
error happens after this function.
I've found that dblink works without the oid map, ie: dblink(... , ... , false)
but returns the error when enabled, ie: dblink(... , ... , true)
The only part of dblink affected by this flag (use_oid_map) is within 'pgresultGetTupleDesc'
and the only variable affected is 'atttypid' - which is left alone if use_oid_map is false. When use_oid_map is true, SPI is used to prepare a query, and execute it for each attribute - atttypid is then assigned the value retreived from the query.
So when no custom types are used, the same values are passed to 'TupleDescInitEntry' whether use_oid_map is true or false.
I just can't work it out!
-- 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