Re: DBLink cursors

From: Kevin Brown <kevin(at)sysexperts(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: DBLink cursors
Date: 2003-04-17 02:39:27
Message-ID: 20030417023927.GF1833@filer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joe Conway wrote:
> Joe Conway wrote:
> >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...
> >
>
> [...snip...]
>
> >
> >regression=# SELECT dblink_close('rmt_foo_cursor');
>
> But then again, dblink_close issues a COMMIT, so beware...

Ooops. Forgot about that.

The code change I'd make is to not issue the COMMIT if the previous
BEGIN generated a warning. Is there any way for dblink to detect
that?

--
Kevin Brown kevin(at)sysexperts(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-04-17 03:01:26 Re: GLOBAL vs LOCAL temp tables
Previous Message Kevin Brown 2003-04-17 02:35:25 Re: pg_clog woes with 7.3.2 - Episode 2