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

Re: Fixes for autocommit = off

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Fixes for autocommit = off
Date: 2002-10-16 14:10:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Joe Conway <mail(at)joeconway(dot)com> writes:
> Speaking of autocommit = off, I was contemplating sending in a patch for 
> dblink with this in it:
>    appendStringInfo(str,
>                     "BEGIN;SET autocommit='on';COMMIT; %s",
>                      GET_STR(PG_GETARG_TEXT_P(1)));
> (where arg 1 is the user provided sql statement) to cover the non-persistent 
> connection case for dblink_exec. Is this the recommended client fix?

You do not need the begin/commit here.

A bigger question is why dblink should be doing that at all... seems
like it should be the programmer's responsibility.

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Barry LindDate: 2002-10-16 16:36:53
Subject: Re: JDBC patch reduces memory consumption
Previous:From: Denis PerchineDate: 2002-10-16 13:03:04
Subject: JDBC patch reduces memory consumption

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