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

Re: [GENERAL] dblink: rollback transaction

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org,Oleg Lebedev <oleg(dot)lebedev(at)waterford(dot)org>
Subject: Re: [GENERAL] dblink: rollback transaction
Date: 2004-02-24 06:19:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-patches
Tom Lane wrote:

> Joe Conway <mail(at)joeconway(dot)com> writes:
>>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?

> What seems like a good idea after a few moments' thought is to leave the
> behavior of the various dblink_foo() functions the same as now (ie,
> throw error on remote error) and add new API functions named something
> like dblink_foo_noerror() that don't throw error but return a
> recognizable failure code instead.  My argument for this approach is
> that there is no situation in which the programmer shouldn't have to
> think when he writes a given call whether it will elog or return an
> error indicator, because if he wants an error indicator then he is going
> to have to check for it.

I like the idea in general, but maybe instead there should be a new 
overloaded version of the existing function names that accepts an 
additional bool argument. Without the argument, behavior would be as it 
is now; with it, you could specify the old or new behavior.


In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2004-02-24 06:27:02
Subject: Re: [GENERAL] dblink: rollback transaction
Previous:From: Joe ConwayDate: 2004-02-24 06:11:19
Subject: Re: dblink - custom datatypes NOW work :)

pgsql-general by date

Next:From: Seamus Thomas CarrollDate: 2004-02-24 06:24:51
Subject: Re: Create Schema functionality question
Previous:From: Joe ConwayDate: 2004-02-24 06:11:19
Subject: Re: dblink - custom datatypes NOW work :)

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