Re: [BUGS] BUG #2129: dblink problem
От | Joe Conway |
---|---|
Тема | Re: [BUGS] BUG #2129: dblink problem |
Дата | |
Msg-id | 43BA0709.5010106@joeconway.com обсуждение исходный текст |
Ответ на | Re: [BUGS] BUG #2129: dblink problem (Joe Conway <mail@joeconway.com>) |
Ответы |
Re: [BUGS] BUG #2129: dblink problem
|
Список | 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
В списке pgsql-patches по дате отправления: