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 1mSklg-0008Vf-G7 for pgsql-general@arkaria.postgresql.org; Tue, 21 Sep 2021 18:45:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mSkld-00079n-DT for pgsql-general@arkaria.postgresql.org; Tue, 21 Sep 2021 18:45:21 +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 1mSkld-00079e-44 for pgsql-general@lists.postgresql.org; Tue, 21 Sep 2021 18:45:21 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSkla-0007sp-8S for pgsql-general@lists.postgresql.org; Tue, 21 Sep 2021 18:45:20 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 6C14F5343; Tue, 21 Sep 2021 20:45:14 +0200 (CEST) Date: Tue, 21 Sep 2021 20:45:14 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Re: Timestamp with vs without time zone. Message-ID: Mail-Followup-To: pgsql-general@lists.postgresql.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bvUdl06kunGnHR6v" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --bvUdl06kunGnHR6v Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-09-21 13:43:46 -0400, Dave Cramer wrote: >=20 >=20 > On Tue, 21 Sept 2021 at 13:40, Peter J. Holzer wrote: >=20 > On 2021-09-21 13:34:21 -0400, Dave Cramer wrote: > > On Tue, 21 Sept 2021 at 13:20, Peter J. Holzer w= rote: > >=C2=A0 =C2=A0 =C2=A0On 2021-09-21 20:50:44 +1200, Tim Uckun wrote: > >=C2=A0 =C2=A0 =C2=A0Calling a type which doesn't include a timezone > >=C2=A0 =C2=A0 =C2=A0"timestamp with timezone" is - how do I put this= ? - more than just > >=C2=A0 =C2=A0 =C2=A0weird. > > > > I would say this is a perspective thing. It's a timestamp with a ti= me > > zone from the client's perspective. >=20 > I disagree. When I read back the value the original timezone is lost.= So > it clearly DOESN'T store the timestamp WITH the timezone. >=20 >=20 > I never said it stored the timezone.=C2=A0 I said that it has a timezone.= =C2=A0 The raison d=E2=80=99=C3=AAtre of a database is to store data. If some data= isn't stored, the database doesn't have it, in my opinion. As a different example, I can store a number with 15 decimal digits in a fl= oat4 and I can get 15 decimal digits out again: hjp=3D> create table t (f float4); CREATE TABLE hjp=3D> insert into t(f) values(1.23456789012345); INSERT 0 1 hjp=3D> select f::float8::numeric from t; =E2=95=94=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=97 =E2=95=91 f =E2=95=91 =E2=95=9F=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94= =80=E2=94=80=E2=94=80=E2=95=A2 =E2=95=91 1.23456788063049 =E2=95=91 =E2=95=9A=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2= =95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95=90=E2=95= =90=E2=95=90=E2=95=90=E2=95=9D (1 row) But those digits aren't the same I stored. So a float4 doesn't "have" 15 decimal digits of accuracy. Not even 8, although in this specific case the first 8 digits happen to be correct. hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --bvUdl06kunGnHR6v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmFKKDEACgkQ8g5IURL+ KF15bBAAiR+qIWCQtZ0V+eXfyj2tSn1OqiY4APEDbHaczPdkY06N9tlBMhQu2BsR pBIyd8durAplrVWycA7XnhTrPy7SfMHyhcA1jmS9/XUwqSWeb8vD+X0XXXhbccur thXd7Zh35tEdI5qhEEEaGUJwcx1gErMRY85YYRLYxhd1uboBmP2eDOwHZlIo2296 zF9Jm/2cWF9xVvHTqnFDw2N/aJBIVJnvd4L6DAD25gZar4t3H6OMmCYHN1Fx3Dze BWIh1mXpJCECbrjXWBrBBJP19qc6KerbFPzbJ7ETzPa/wOox3GqM1ogW7P7eGtFs snqBMk/WqlU64Gh9bY2QqPpfj9p3RFQ24mZ9XJcLJP9HzZfHmOM+QRweHtDnxw00 fQHlTI+YDS3rAkDK1PpRHucjruQtS+eMcvhkysqX4SCSRjSw7j7kEhkUig4Uab3k eyO9d76i4VIffJGUCJeTWijAa5jj9ahYo9unRfypxHUrWM37gk4yEsNDDKcZUNLe 1IhmcLEC7HJExheQ+1B/D3ATKmbRLS1muQ0la/+x2QmXJIsXX7zNlb/diTV7ExVP ODP+DOMMy84nsxQpht14ovTnGcz6VmPacPN84Fke7sBPpfziK1GPFfRuqkpRyY50 NGOwaVtMMsCr0Y6YCND20946Oi9+/Mp1X2AygRVqtzD92AzR/oQ= =mZoD -----END PGP SIGNATURE----- --bvUdl06kunGnHR6v--