Re: DBLink cursors
| От | Joe Conway |
|---|---|
| Тема | Re: DBLink cursors |
| Дата | |
| Msg-id | 3E9E0F46.3030904@joeconway.com обсуждение |
| Ответ на | Re: DBLink cursors (Kevin Brown <kevin@sysexperts.com>) |
| Ответы |
Re: DBLink cursors
|
| Список | pgsql-hackers |
Kevin Brown wrote:
> Won't dblink's attempt to initiate a transaction simply return with a
> warning if a transaction is already in progress? This is what psql
> does, and it's also what happens with Perl DBI, so it's only if dblink
> freaks out that there will be a problem.
>
> I wouldn't expect it to abort the entire (already running)
> transaction upon receipt of a warning...
>
>
It's been a while since I even looked at that code very closely, so I
took it for granted that Shridhar had tried it and it failed. But I
guess not; you're right (works on 7.3.2 and 7.4devel):
regression=# begin;
BEGIN
regression=# SELECT dblink_open('rmt_foo_cursor','SELECT * FROM foo'); dblink_open
------------- OK
(1 row)
regression=# SELECT *
regression-# FROM dblink_fetch('rmt_foo_cursor',4) AS t(a int, b text, c
text[]); a | b | c
---+---+------------ 0 | a | {a0,b0,c0} 1 | b | {a1,b1,c1} 2 | c | {a2,b2,c2} 3 | d | {a3,b3,c3}
(4 rows)
regression=# SELECT dblink_close('rmt_foo_cursor'); dblink_close
-------------- OK
(1 row)
regression=# commit;
COMMIT
Joe
В списке pgsql-hackers по дате отправления: