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 1rfo70-002QIi-5H for pgsql-general@arkaria.postgresql.org; Thu, 29 Feb 2024 21:38:42 +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 1rfo6y-008pHg-5P for pgsql-general@arkaria.postgresql.org; Thu, 29 Feb 2024 21:38:40 +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 1rfo6x-008pHY-R5 for pgsql-general@lists.postgresql.org; Thu, 29 Feb 2024 21:38:40 +0000 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rfo6u-002DdC-8W for pgsql-general@postgresql.org; Thu, 29 Feb 2024 21:38:38 +0000 Received: by mail-il1-x133.google.com with SMTP id e9e14a558f8ab-365afa34572so6303815ab.1 for ; Thu, 29 Feb 2024 13:38:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709242716; x=1709847516; darn=postgresql.org; h=mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=Bo3bFmwnr/dySCUuF5H1VpdfLWuWJ3DaXgqsFePWrbs=; b=JH2TrS6ML1AfJsphW30QrQ0SVz07GkqTvxZ5BSOqppmVTOhHHOCGOzfluQX90lzg6P xSVnHHYQIUGOQ55ErCj7ULeU1cXzUc6bVVi4b3D/N34L3sYsk7r/gXJ8lVp2BMrnNZyj mnBMETHejPshAgLU0t0Uuc5TkUHc1mh3lr3MpCBDgiEbz2SKwZNTho6YBGFswFlZAQRa lGSFge8Yg7pCp31bBczSiyJ+BymSTPQIYHUZe8YxsYOM+0/l6SGAJBuUXiivau4aX5m3 PjARwX8QpGMRoDDuvd2Vvh44ZfijjQSqvBq/cFfsQXYWwSj30oOblNIGct5tGzxt2Isb fntQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709242716; x=1709847516; h=mime-version:subject:references:in-reply-to:message-id:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Bo3bFmwnr/dySCUuF5H1VpdfLWuWJ3DaXgqsFePWrbs=; b=c1Lc4JY0T4XcRNkN90rOb4w5L6MskTrg0SGOkHrsGMZ1bP4zMS1zi5SY6JqFosOzkI Ucah49sy58d+pBvvznYmlG88BGgjiuUMC5ZAg7N1r5Bq6UhVbuAKIzc3hccEknU6qki8 wigiVDfiY3TW//Dko21h5bIzDJ99sUzRbU+4E9rHMPVcmFgaH3jV2JpByrs/NDj8VcG9 LoROqMyyRszCkB+gKjXQjycGFTgr6bJ5XntMbFOEFUGVbJCLTlUqZA07fUAlswMrw2AE rxKKuOWP65PLyHWojcG9Swnp2v8z2OGpPsi7DRqt2q20Haw0AFWxmwtK1eYvq5/RP/47 a87Q== X-Gm-Message-State: AOJu0Yza4mmenQgiEIf5lnj4MoyLZRD/2NAkEuWoV31DFWqk4FC943/6 njoXOnzuV3aUHcDBV1LGFoqEYSGHkkOcGzPplH8v0KxTIOBmL4udigDTcI8l X-Google-Smtp-Source: AGHT+IGlaZ4N1E0yz2tcXwHqIVR0dZKQ06Wp41b3gHwjkspncAAx9Cvt9rANpGDobAZjyCCjGdqHgw== X-Received: by 2002:a92:c549:0:b0:365:5dbd:aa34 with SMTP id a9-20020a92c549000000b003655dbdaa34mr286137ilj.12.1709242716026; Thu, 29 Feb 2024 13:38:36 -0800 (PST) Received: from [2600:8801:8600:631:fa:7b0f:100:0] ([2600:8801:8600:631::e]) by smtp.gmail.com with ESMTPSA id b29-20020aa78edd000000b006e08da9c29csm703406pfr.54.2024.02.29.13.38.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Feb 2024 13:38:35 -0800 (PST) Date: Thu, 29 Feb 2024 13:38:16 -0800 From: Guyren Howe To: Postgres General , Laurenz Albe Message-ID: <372fd5d1-8d7c-411e-8a35-41793978e74b@Spark> In-Reply-To: <08e99a8fa744e063ea31030d6516bfc64c26e3f8.camel@cybertec.at> References: <08e99a8fa744e063ea31030d6516bfc64c26e3f8.camel@cybertec.at> Subject: Re: Content for talk on Postgres Type System at PostgresConf X-Readdle-Message-ID: 372fd5d1-8d7c-411e-8a35-41793978e74b@Spark MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="65e0f959_32dadaef_2b6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --65e0f959_32dadaef_2b6 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline In case I=E2=80=99m not correct on the issues with these types, myself, w= hat are the misconceptions, or where might I find them for=C2=A0=C2=A0mys= elf=3F My current understanding: =E2=80=A2 character is fixed-length, blank-padded. Not sure when you=E2=80= =99d want that, but it seems clear. Is the name just confusing=3F =E2=80=A2 timestamptz is just converted to a timestamp in UTC. =46olks mi= ght imagine that it stores the time zone but it doesn=E2=80=99t. =E2=80=A2 time with time zone *does* store the time zone, but this isn=E2= =80=99t actually useful and should be avoided (I=E2=80=99m not entirely s= ure why and the docs only gesture at the problems without stating them, I= IRC) =E2=80=A2 money is a fixed-point decimal value, the number of decimal pla= ces is locale determined. I=E2=80=99m not aware of any particular problem= s with that On 29 =46eb 2024 at 01:11 -0800, Laurenz Albe , wrote: > On Wed, 2024-02-28 at 17:08 -0800, Guyren Howe wrote: > > I am to talk about Postgres=E2=80=99s type system at PGConf: > > > > https://postgresconf.org/conferences/2024/program/proposals/postgres-= s-type-system > > > > I picked the issue because I think it=E2=80=99s poorly understood, gr= eatly > > under-discussed, and an excellent way to empower postgres users. > > > > What would you want to see in such a talk=3F > > It might be good to explain how =22timestamp with time zone=22 works. > That's often confusing for beginners, because it is different from > other databases and arguably deviates from the SQL standard. > > Perhaps it would be good to warn people about using data types like > =22character=22, =22time with time zone=22 and =22money=22. > > Yours, > Laurenz Albe --65e0f959_32dadaef_2b6 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
In case I=E2=80=99m not correct on the issues with = these types, myself, what are the misconceptions, or where might I find t= hem for&=23160;&=23160;myself=3F

My current understanding:
  • character is fixed-length, blank-padded. Not sure when you=E2=80=99d = want that, but it seems clear. Is the name just confusing=3F
  • timestamptz is just converted to a timestamp in UTC. =46olks might im= agine that it stores the time zone but it doesn=E2=80=99t.
  • time with time zone *does* store the time zone, but this isn=E2=80=99= t actually useful and should be avoided (I=E2=80=99m not entirely sure wh= y and the docs only gesture at the problems without stating them, IIRC)
  • money is a fixed-point decimal value, the number of decimal places is= locale determined. I=E2=80=99m not aware of any particular problems with= that
On 29 =46eb 2024 at 01:11 -0800, La= urenz Albe <laurenz.albe=40cybertec.at>, wrote:
On Wed, 2024-02-28 at 17:08 -0800, Guyren Howe wrote:
I am to talk about Postgres=E2=80=99s type = system at PGConf:

https://postgresconf.org/conferences/2024/program/proposals/postgres-s-ty= pe-system

I picked the issue because I think it=E2=80=99s poorly understood, greatl= y
under-discussed, and an excellent way to empower postgres users.

What would you want to see in such a talk=3F

It might be good to explain how =22timestamp with time zone=22 works.
That's often confusing for beginners, because it is different from
other databases and arguably deviates from the SQL standard.

Perhaps it would be good to warn people about using data types like
= =22character=22, =22time with time zone=22 and =22money=22.

Yours,
Laurenz Albe
--65e0f959_32dadaef_2b6--