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 1uH2Ye-00CLtx-Gc for pgsql-jdbc@arkaria.postgresql.org; Mon, 19 May 2025 15:37:40 +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 1uH2Yd-00Gby0-EY for pgsql-jdbc@arkaria.postgresql.org; Mon, 19 May 2025 15:37:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uH2Yd-00Gbxs-71 for pgsql-jdbc@lists.postgresql.org; Mon, 19 May 2025 15:37:39 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uH2Ya-002hdK-1n for pgsql-jdbc@lists.postgresql.org; Mon, 19 May 2025 15:37:38 +0000 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-ad51ef2424bso656902966b.0 for ; Mon, 19 May 2025 08:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747669056; x=1748273856; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WgezwWLbMdrl3xDRjWXsB//t23VepIMLXpiWDMQf6FE=; b=NhpuCfI/gzahCepPh5kAOinOXKEHM799yug12S5jON+5xQTa5RRqvHDOJaweRD7fXZ m0oF0sIKMMlilg0lPGUF0WeXf7dg7WzNK2DOchP8+UnDxtOBCTHGWJvNs5aF8kznBXjN YhMO2sBz+bzreIhVfMnJXfHBZ6F0KcP5lzDwQJ2bpER2L6inze3Sv/U+nFV7AUFfDtO0 uT6LXJparUXHvBawduFnqeR2CUF5aQg1wev4wMf4BkLILDJNZU+vdCH3ePHSRVtJ7wdl xnuTTTaNG2Km6HOpGqWpNAIHQukFwjxa6RrqkbJrOrutvJ0lczw2O3zLTUYKzpf0h9rP cRAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747669056; x=1748273856; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WgezwWLbMdrl3xDRjWXsB//t23VepIMLXpiWDMQf6FE=; b=UUMja7SXP2zkaIx9S12I9I9TEJovOn3JlgwzWMue9zqE+iwvgbFidT6X+zJUS+g35G bgVL7J6/aKH5GBuRqLddyjFBFq/LFTO7yXsm/zu9j2HVF0U87OLrSSENivQWBYekjG2L ehjv18uXPOUYH8jtEYZKnNqI28X6H7M+Vb8FwzsdV6oJxhxQK3pbLSl+R5TSlf8uH9b5 4wzgyZ/Csfb+cSq3rrxGXumZ56y98MPWDEgd26zuobj1o2Jy/SZlzW2S5wu3aZDBjNQT JDZde4X4mRPuTelARCElwlGOwytj0oDwAvSOIZOhTj1fX3uvBlSAcBx5M9djNbP7dzF+ 0E3A== X-Forwarded-Encrypted: i=1; AJvYcCWQDayOuUVFSEhmwKUAs8yEocMP4QUciVDi+QHhsRfSiEq45x6yzY/+hpn0PH/b+yiZty3fq4aqw0iU@lists.postgresql.org X-Gm-Message-State: AOJu0Yx9JonpnkSiwFKxA+G1dmLCtM4EgqKg6in8u9NolDomuQpDmy5g zagCbWARKJ+/kUcN88zbQubn3f1VAaF0R87pwh2tMRPgrgcXuYMe+fiZXd0YeeoYYCb942SE9/V vhhtI7WhPXEaX2HuD6MOZJNETuo+X0+4= X-Gm-Gg: ASbGncv+k528gtldKvgO9CXZHXFgdwpOqJpBY+EmRzVbTig5YwdGeeQ6K1nJK1QaDzo 8j0HLKGsBwzS5lPION9A5/qBVYJHHQd7E52X50bLIzpwYp5n2XDIFkbPmq11QMmW5T7kVHTC2yu +paioNlcypfk3FcaZc3jXgKPu6UUk0LQVNYA== X-Google-Smtp-Source: AGHT+IGK8mk5KCPIwm+GUHEu9MKeNVl7OzK6Nqd6UAm2+TqFqiJO+ooaQuOc7i5ht0KfBksp7yqdgME57kmaxpYiVjI= X-Received: by 2002:a17:906:c148:b0:ad2:3f1f:7971 with SMTP id a640c23a62f3a-ad52d43839amr1201260866b.8.1747669055498; Mon, 19 May 2025 08:37:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Vladimir Sitnikov Date: Mon, 19 May 2025 18:37:24 +0300 X-Gm-Features: AX0GCFttSDm6wsJabGrpT1748uoskhjzeBkLPLkRjPnczi5bLiElgsxP1L52IHc Message-ID: Subject: Re: Understanding DateStyle guc in startup packet To: Dave Cramer Cc: Manav Kumar , pgsql-jdbc@lists.postgresql.org, Laurenz Albe Content-Type: multipart/alternative; boundary="0000000000003cf14406357ee963" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003cf14406357ee963 Content-Type: text/plain; charset="UTF-8" >Why would you want to change it? Applications might have their own view on the way DateStyle connection property should be set. It could make a difference if the app uses things like select '03-05-2025'::date. Of course, it would be great if the app code could resist from casting text to dates, however, I think the driver should stand in the way there by enforcing a very specific DateStyle value. To me, DateStyle looks like timezone, and client_encoding which we currently enforce, yet we could do better and skip enforcing the values. Vladimir --0000000000003cf14406357ee963 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>Why would you want to change it?=

Applications might have their own view on the way= DateStyle connection property should be set.
It could make a dif= ference if the app uses things like select '03-05-2025'::date.
<= br>
Of course, it would be great if the app code could resist fro= m casting text to dates, however,
I think the driver should stand= in the way there by enforcing a very specific DateStyle value.
<= br>
To me, DateStyle looks like timezone, and=C2=A0client_encodin= g which we currently enforce, yet we could do better and skip enforcing the= values.

Vladimir

--0000000000003cf14406357ee963--