Re: DBLink cursors

From: Joe Conway <mail(at)joeconway(dot)com>
To: Kevin Brown <kevin(at)sysexperts(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: DBLink cursors
Date: 2003-04-17 02:19:50
Message-ID: 3E9E0F46.3030904@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-04-17 02:26:56 Re: DBLink cursors
Previous Message Joe Conway 2003-04-17 02:05:31 Re: One more question regarding dblink