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: 24000.1034777401@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Browse pgsql-patches by date

  From Date Subject
Next Message Barry Lind 2002-10-16 16:36:53 Re: JDBC patch reduces memory consumption
Previous Message Denis Perchine 2002-10-16 13:03:04 JDBC patch reduces memory consumption