Re: DBLink cursors - Mailing list pgsql-hackers

From Kevin Brown
Subject Re: DBLink cursors
Date
Msg-id 20030417023927.GF1833@filer
Whole thread Raw
In response to Re: DBLink cursors  (Joe Conway <mail@joeconway.com>)
List 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@sysexperts.com



pgsql-hackers by date:

Previous
From: Kevin Brown
Date:
Subject: Re: pg_clog woes with 7.3.2 - Episode 2
Next
From: Tom Lane
Date:
Subject: Re: GLOBAL vs LOCAL temp tables