Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uH2AK-00CELY-Ki for pgsql-jdbc@arkaria.postgresql.org; Mon, 19 May 2025 15:12:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uH2AJ-00GQkY-FH for pgsql-jdbc@arkaria.postgresql.org; Mon, 19 May 2025 15:12:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uH2AJ-00GQkQ-8X for pgsql-jdbc@lists.postgresql.org; Mon, 19 May 2025 15:12:31 +0000 Received: from pgintl.fastcrypt.com ([149.56.129.164]) by makus.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1uH2AG-002ala-26 for pgsql-jdbc@lists.postgresql.org; Mon, 19 May 2025 15:12:30 +0000 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by pgintl.fastcrypt.com (Postfix) with ESMTPSA id 2E867201DB for ; Mon, 19 May 2025 11:12:28 -0400 (EDT) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-5fbc736f0c7so7065551a12.2 for ; Mon, 19 May 2025 08:12:28 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXMq0vELwBSfS204x4GDg5K2BcJDexrwk8gjOe7hgcBEQbBWt7ZRYsBRf5XkRsNKSOHiuojf+6ksoJA@lists.postgresql.org X-Gm-Message-State: AOJu0YzF1dGCf3xB3skw9zKlCxKgBZUIqPVqIYoLemHEoUcAaoEN3hRH dk/PNFUdn2AiXRx2BQS+5ZceDpsgSryVffvIzW2R/gbjQnEGQbLzaXd5QaCdEUMNKuz2Cw5Q8Nl 0+kxw/q2xfLHSD5LIxqGAT/m/Ck0NIJ8= X-Google-Smtp-Source: AGHT+IFlr7c0m5CK9s/CL6W4k4HJj5GFeePQOshVgU4rXvuIie1jatuLrw+axl2M4IE6CYPHiiKQfuASOuokUGcZk08= X-Received: by 2002:a05:6402:26d1:b0:601:f5b0:84fd with SMTP id 4fb4d7f45d1cf-601f5b08714mr2501376a12.31.1747667547121; Mon, 19 May 2025 08:12:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Cramer Date: Mon, 19 May 2025 11:12:10 -0400 X-Gmail-Original-Message-ID: X-Gm-Features: AX0GCFvBvcgqa1pr5DnzMUTfQX6AX1IToIoH4tKWdbT3VBy6fXZPyPaNqw6XmUA Message-ID: Subject: Re: Understanding DateStyle guc in startup packet To: Vladimir Sitnikov Cc: Manav Kumar , pgsql-jdbc@lists.postgresql.org, Laurenz Albe Content-Type: multipart/alternative; boundary="00000000000054f1fb06357e8fc2" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000054f1fb06357e8fc2 Content-Type: text/plain; charset="UTF-8" On Mon, 19 May 2025 at 08:23, Vladimir Sitnikov wrote: > Long story short: it might be nice to decouple pgjdbc from requiring > DateStyle=ISO, however, it does not look like a walk in the park to me. > > I guess here's the line that configures DateStyle ISO: > https://github.com/pgjdbc/pgjdbc/blob/d9e20874590f59543c39a99b824e09344f00a813/pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java#L409 > > It looks like options come after DateStyle. > > At the same time, for some reason related to COPY processing, the driver > asserts DateStyle must start with ISO: > https://github.com/pgjdbc/pgjdbc/issues/131 > Why would you want to change it? We keep it a specific way to simplify parsing it internally. If you want to display it differently than you can change the output format > Dave Cramer > www.postgres.rocks > > --00000000000054f1fb06357e8fc2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Mon, 19 May 2025 at 08:23, Vladimir Sitnikov <sitnikov.vladimir@gmail.com> wr= ote:
Long story short: it might be nice to decouple pgjdbc from requi= ring DateStyle=3DISO, however, it does not look like a walk in the park to = me.

It looks like options come=C2=A0after DateStyle.

=
At the same time, for some reason related to COPY processing, th= e driver asserts DateStyle must start with ISO:=C2=A0https://github.com/pgjd= bc/pgjdbc/issues/131

Why wo= uld you want to change it? We keep it a specific way to simplify parsing it= internally. If you want to display it differently than you can change the = output format


D= ave Cramer
www.postgres.rocks

--00000000000054f1fb06357e8fc2--