Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] dblink: rollback transaction

From: Joe Conway <mail(at)joeconway(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Cc: Oleg Lebedev <oleg(dot)lebedev(at)waterford(dot)org>
Subject: Re: [GENERAL] dblink: rollback transaction
Date: 2004-02-23 02:03:08
Message-ID: 40395F5C.5030200@joeconway.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-patches
Oleg Lebedev wrote:
> Your fix is awesome! That's exactly what I need. 
> What version of postgres do I need to have installed to try this patch?
> I am on 7.3 now.

I plan to apply the attached to cvs tip in 24 hours or so. I don't think 
it qualifies as a bug fix, and it does represent a change in user facing 
behavior, so I do not intend to apply for 7.3.6 or 7.4.2.

The patch changes dblink_exec() such that an ERROR on the remote side of 
the connection will generate a NOTICE on the local side, with the 
dblink_exec() return value set to 'ERROR'. This allows the remote side 
ERROR to be trapped and handled locally.

One question that I'd like some feedback on is the following: should the 
same change be applied to other functions that might throw an ERROR 
based on the remote side of the connection? For example, currently if 
dblink() is used in an attempt to access a non-existent remote table, an 
ERROR is thrown locally in response, killing any currently open 
transaction. Thoughts?

Thanks,

Joe


Attachment: dblink-trans-test.patch
Description: text/plain (1.8 KB)

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2004-02-23 03:15:07
Subject: Re: dblink - custom datatypes NOW work :)
Previous:From: Joe ConwayDate: 2004-02-23 01:24:17
Subject: Re: [GENERAL] connectby for BYTEA keys

pgsql-general by date

Next:From: Tom LaneDate: 2004-02-23 03:15:07
Subject: Re: dblink - custom datatypes NOW work :)
Previous:From: Joe ConwayDate: 2004-02-23 01:24:17
Subject: Re: [GENERAL] connectby for BYTEA keys

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group