Re: [PATCHES] [HACKERS] Patching dblink.c to avoid warning about open transaction

2005-10-16 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > Here is my counter-proposal to Bruce's dblink patch. Any comments? Minor coding suggestion: to me it seems messy to do > + int*openCursorCount = NULL; > + bool *newXactForCursor = NULL; > ! openCursorCount = &pconn->openC

Re: [PATCHES] [HACKERS] Patching dblink.c to avoid warning about open transaction

2005-10-07 Thread Tom Lane
Bruce Momjian writes: > The problem with not using rconn is that we are not saving the > transaction status at the _start_ of the cursor open. If we don't do > that, we have no way of knowing on close if _we_ opened the transaction > or whether it was opened by the user. Oh, I see. In that case

Re: [PATCHES] [HACKERS] Patching dblink.c to avoid warning about open transaction

2005-10-07 Thread Tom Lane
Bruce Momjian writes: > Well, as I said in the patch email: > The reported problem is that dblink_open/dblink_close() (for cursor > reads) do a BEGIN/COMMIT regardless of the transaction state of the > remote connection. There was code in dblink.c to track the remote > tr

Re: [PATCHES] [HACKERS] Patching dblink.c to avoid warning about open transaction

2005-10-06 Thread David Fetter
On Thu, Oct 06, 2005 at 11:31:46PM -0400, Tom Lane wrote: > David Fetter <[EMAIL PROTECTED]> writes: > > On Thu, Oct 06, 2005 at 10:38:54PM -0400, Bruce Momjian wrote: > >> I don't know if people want this for 8.1 or 8.2. > > > 8.1, IMHO. It's a bug fix. :) > > Not unless Joe Conway signs off on

Re: [PATCHES] [HACKERS] Patching dblink.c to avoid warning about open transaction

2005-10-06 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes: > On Thu, Oct 06, 2005 at 10:38:54PM -0400, Bruce Momjian wrote: >> I don't know if people want this for 8.1 or 8.2. > 8.1, IMHO. It's a bug fix. :) Not unless Joe Conway signs off on it ... regards, tom lane

Re: [PATCHES] [HACKERS] Patching dblink.c to avoid warning about open transaction

2005-10-06 Thread David Fetter
On Thu, Oct 06, 2005 at 10:38:54PM -0400, Bruce Momjian wrote: > > I'm not a member of this list (yet), so please CC me on responses > > and discussion. The patch below seems to be completion of work > > already started, because the boolean remoteTrFlag was already > > defined, and all I had to add

Re: [PATCHES] [HACKERS] Patching dblink.c to avoid warning about open transaction

2005-10-06 Thread Bruce Momjian
> I'm not a member of this list (yet), so please CC me on responses and > discussion. The patch below seems to be completion of work already > started, because the boolean remoteTrFlag was already defined, and all I > had to add was its setting and two references. I hope someone will find > it usef