Re: Patch for handling "autocommit=false" in postgresql.conf

Поиск
Список
Период
Сортировка
От snpe
Тема Re: Patch for handling "autocommit=false" in postgresql.conf
Дата
Msg-id 200209171824.21683.snpe@snpe.co.yu
обсуждение исходный текст
Ответ на Re: Patch for handling "autocommit=false" in postgresql.conf  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
On Tuesday 17 September 2002 04:26 pm, Tom Lane wrote:
> snpe <snpe@snpe.co.yu> writes:
> > +               // handle autocommit=false in postgresql.conf
> > +                if (haveMinimumServerVersion("7.3")) {
> > +                               ExecSQL("set autocommit to on; commit;");
> > +               }
>
> The above will fill people's logs with
>     WARNING:  COMMIT: no transaction in progress
> if they don't have autocommit off.
>
> Use
>     begin; set autocommit to on; commit;
> instead.
>
> I would recommend holding off on this patch altogether, actually,
> until we decide whether SET will be a transaction-initiating
> command or not.  I would still like to persuade the hackers community
> that it should not be.

if set 'begin; setautocommit to on; commit;'
this is work no matter autocommit on or off and whether SET initiate
transaction or not.
We can yet query database for transaction (on or off), but this is not
important (we must autocommit=true for jdbc spec).

regards
haris peco

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: NOTICE causing SQLException
Следующее
От: Al Sutton
Дата:
Сообщение: JDBC API Tests