logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Fixes for autocommit = off: msg#00145

Subject: Re: Fixes for autocommit = off
Joe Conway <mail@xxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
message can get through to the mailing list cleanly




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>