Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lokdx-00056p-8T for pgsql-docs@arkaria.postgresql.org; Thu, 03 Jun 2021 10:32:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lokdv-0000CI-W4 for pgsql-docs@arkaria.postgresql.org; Thu, 03 Jun 2021 10:32:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lokdv-0000CA-QF for pgsql-docs@lists.postgresql.org; Thu, 03 Jun 2021 10:32:03 +0000 Received: from mail2.fastcrypt.com ([192.99.154.132]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lokds-0002ht-W1 for pgsql-docs@lists.postgresql.org; Thu, 03 Jun 2021 10:32:03 +0000 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by mail2.fastcrypt.com (Postfix) with ESMTPSA id 74509232D20 for ; Thu, 3 Jun 2021 06:31:58 -0400 (EDT) Received: by mail-ed1-f44.google.com with SMTP id b11so6520076edy.4 for ; Thu, 03 Jun 2021 03:31:58 -0700 (PDT) X-Gm-Message-State: AOAM530FtY1VBRzYFZOtq1ThDWc29AaenQPpx6E5lokY+YEmRcvw0PWc 9+e7kDYmmKFfLJg6Ab1aVaVD0i0UjhyoDhfFsUA= X-Google-Smtp-Source: ABdhPJwzxMYQDW8DPVfqkMT0QqxaPXXSxH3nzjjnnzyJObjP8intjSeFTwOn4XttPo4vhQR06UVZX/hrNzqEmhoXS/c= X-Received: by 2002:a05:6402:34cb:: with SMTP id w11mr20730775edc.299.1622716317373; Thu, 03 Jun 2021 03:31:57 -0700 (PDT) MIME-Version: 1.0 References: <1591471729.4432635.1622706561235.ref@mail.yahoo.com> <1591471729.4432635.1622706561235@mail.yahoo.com> In-Reply-To: <1591471729.4432635.1622706561235@mail.yahoo.com> From: Dave Cramer Date: Thu, 3 Jun 2021 06:31:41 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Default value for the defaultAutoCommit property To: Celinio Fer Cc: pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000ab1b4905c3da159e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ab1b4905c3da159e Content-Type: text/plain; charset="UTF-8" Good catch. Thanks, I will fix that. Dave Cramer www.postgres.rocks On Thu, 3 Jun 2021 at 03:49, Celinio Fer wrote: > Hi, > I wonder if the documentation for the JDBC PostgreSQL driver is up to date > : > https://jdbc.postgresql.org/documentation/head/ds-cpds.html#ds-cpds-props > It is written that the default value for the defaultAutoCommit property > is false. > > However in the source code, the default value is true : > > https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/ds/PGConnectionPoolDataSource.java > > private boolean defaultAutoCommit = true; > ... > /** > * Gets whether connections supplied by this pool will have autoCommit > turned on by default. The > * default value is {@code true}, so that autoCommit will be turned on > by default. > * > * @return true if connections supplied by this pool will have autoCommit > */ > public boolean isDefaultAutoCommit() { > return defaultAutoCommit; > } > > Did i miss something ? > Thanks > Celinio > > > --000000000000ab1b4905c3da159e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Good catch.

Thanks, I will fix that.
Dave Cramer
www.postgres.rocks<= /div>


On Thu, 3 Jun 2021 at 03:49, Celinio Fer &= lt;celfersup@yahoo.com> wrote= :
Hi,
I wonder if the documentation for the JDBC PostgreSQL driver is up to date = :
https://jdbc.postgresql.org= /documentation/head/ds-cpds.html#ds-cpds-props
It is written that the default value for the defaultAutoCommit=C2=A0 proper= ty=C2=A0 is false.

However in the source code, the default value is true :
https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main= /java/org/postgresql/ds/PGConnectionPoolDataSource.java

private boolean defaultAutoCommit =3D true;
...
/**
=C2=A0 =C2=A0* Gets whether connections supplied by this pool will have aut= oCommit turned on by default. The
=C2=A0 =C2=A0* default value is {@code true}, so that autoCommit will be tu= rned on by default.
=C2=A0 =C2=A0*
=C2=A0 =C2=A0* @return true if connections supplied by this pool will have = autoCommit
=C2=A0 =C2=A0*/
=C2=A0 public boolean isDefaultAutoCommit() {
=C2=A0 =C2=A0 return defaultAutoCommit;
=C2=A0 }

Did i miss something ?
Thanks
Celinio


--000000000000ab1b4905c3da159e--