From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Cc: | Akio Iwaasa <iwaasa(at)mxs(dot)nes(dot)nec(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: [BUGS] BUG #2129: dblink problem |
Date: | 2006-01-03 05:09:29 |
Message-ID: | 43BA0709.5010106@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-patches |
Joe Conway wrote:
> However, there is a remaining oddity with dblink_fetch(). Basically,
> each time dblink_fetch() is called, the named cursor is advanced, even
> though an error is thrown before returning any rows. Is there a simple
> way to get the number of columns in the result, without actually
> advancing the cursor?
I thought I could work around this issue by obtaining the count returned
for the FETCH using PQcmdTuples(), and then issuing a "MOVE BACWARD
n..." in the case where the return tuple doesn't match. However I get an
empty string:
(gdb) p str->data
$34 = 0x8a4e5a8 "FETCH 2 FROM rmt_foo_cursor"
(gdb) p PQcmdStatus(res)
$35 = 0x8a447c8 "FETCH"
(gdb) p PQcmdTuples(res)
$36 = 0x29dada ""
Any ideas why this isn't working?
Thanks,
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Jacques Gollion | 2006-01-03 11:27:45 | BUG #2139: Problem when calling functions without any argument |
Previous Message | Joe Conway | 2006-01-03 02:34:23 | Re: [BUGS] BUG #2129: dblink problem |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2006-01-03 09:40:53 | Re: Stats collector performance improvement |
Previous Message | Jan Wieck | 2006-01-03 04:06:57 | Re: Stats collector performance improvement |