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.96) (envelope-from ) id 1wNZ1z-000uJe-2u for pgsql-docs@arkaria.postgresql.org; Thu, 14 May 2026 16:35:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wNZ1x-00DoxM-1S for pgsql-docs@arkaria.postgresql.org; Thu, 14 May 2026 16:35:25 +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.96) (envelope-from ) id 1wNZ1x-00Dowx-04 for pgsql-docs@lists.postgresql.org; Thu, 14 May 2026 16:35:25 +0000 Received: from mail-yx1-xb12a.google.com ([2607:f8b0:4864:20::b12a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wNZ1v-00000000ZGo-0LVp for pgsql-docs@lists.postgresql.org; Thu, 14 May 2026 16:35:24 +0000 Received: by mail-yx1-xb12a.google.com with SMTP id 956f58d0204a3-65c1ba7eeb6so9375769d50.1 for ; Thu, 14 May 2026 09:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778776521; cv=none; d=google.com; s=arc-20240605; b=i71yuTXyKXXa0ufI0Gu47Jbx6Qkvf6KV5YeX500ewDbBIs2bsf45cklyMZcSR207EL ZIom39H5oj0lcokpuwymCZwFxAanEc7mqFySJGvriaDiYczwHNRtxVS6hw4ZBto2BXnS 24499RC6Mbv3iIuocxLKWJLSN5kskXZK/VJ9EauTr1JTOUyDHVzEh7d5I1tIW6RhG6+M TIw8NC3MY1hnoGcZ1iNv9U0viQiw+uUtJgYvg7WrOJJ5TvglrHM/nEL8GZVRmuZB5cfn IOOs7+mRewJM2hOw2vQ//OKbMJWUNl8pBgYhpkZtGik70cY8mRl1Qa8eeoI2DOOqGtlc Iwnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:dkim-signature; bh=E/mjynaxvOU3unrc/etQW08dZwwXzp4omOnaiAh+CG4=; fh=RxapqYef/MfG5QF8YC++fBVG/OH/UuOlrcggexujHnw=; b=B8W0DIZtQMMyNgjayP0eDgms+ULjGuTmNayBLa5bFyPX3BpX7hxUSVs1U4eBIKkdzr qhs/fhk4D/ZiAcHBdoEBY9UV11zsm7gmuDXfliptataub3Wo1iYEpaL9wlaei5kta0mK ppzfdEk15yDcr3WDJ8A1Lo84aHpkMWzx22Q04U0vMwSwYdXWdVHXGBrdNSFKMeCd7hC6 dlMAd9rQnDBrJXzCvjbKeXWfXhJIwt2dx+3YNG7rCyD81hjdi5IPhlM6gkipdsAtY5vL /7aR9QP8x+HsFk71bkrs1nRNbGODalV9xn5kfvOqMnfIHpNQTlGafdvpI3Zu8wm5ZGc1 euRQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778776521; x=1779381321; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=E/mjynaxvOU3unrc/etQW08dZwwXzp4omOnaiAh+CG4=; b=jUR826Aj0WHHlRTINzaC5P7LJiILsLgTgse5wpa8ka/Qxw2va3pqGKuz60OcGY6biG Xb16QeOC4LkQK2eKA9HTKYE7S8aeJhabN0MAGkqVA/58DKCM11pzt7SW4xsmgOVieqXI gsL2PLtU4mSOJKIgSs1qUbyA3aR/eFz8hhidWXZuFHksiTsYBPh8YgbaD08h70eM4Io4 jNIHOv5Vk5ICunC0cNlAvOdiEzUfDtPjpgzBwnP7+1lLgEDBwhxvmrHHzgMBMsIvRyLo G62/6qNDRqIQ8eBejAEMRcsAgGR62eI5SWhGgBcNUDvdXiPpNHGfQAsh2IYyMM1SppnV TJnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778776521; x=1779381321; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=E/mjynaxvOU3unrc/etQW08dZwwXzp4omOnaiAh+CG4=; b=cln+1LsVdKlI2KDPnMjsGqdr6vOgYNatiAMN1r+odbsSs1eg97Skk8Xbs2nKx6mRyQ mkfmNLPqTPZhdAoDJZ2A9wM3SNHHQo62lGL5dgRT2O+mQO9nXrTjbGCOv8CowBZ6kTdW 7dg10nyIGjzJOelEt8X9VhzE3a5w2rhGJKZC29UQYHlXMuzTIimXbMgRbp8huR2RTTdJ i8mItxSFb2I3oPKxfLROeGydkpo/eUj4pmFjwGL8Wym0ahd1ZQiV2Z+jj0W8P2lCMqiP roQvztKk/BiS2hvWLoeNj/pkEWS3AOQFCwPINGxLrJSEjrra+adZWARxisaeYzbX6OUD khGw== X-Forwarded-Encrypted: i=1; AFNElJ+MEbX1rKdJGNEkIhp2tbDmieWQVi8PQ+S+nJSMZo8uI4lhP0MKjLpe0nwKRyBOS1DkY11OYS0hkpzY@lists.postgresql.org X-Gm-Message-State: AOJu0YzW3H+dR8YcEBSAlmYoAwHzd5aLblrfyOPODlgokN0OanAxlGPb vJRz/CAtnaP8szVu0tQfSZfLS+G2LjccsYMf1cR7rOPMs+Gv7oquQWmk4DU+yEJKh+qMW+teQUY aqtusemBab/WoO4CHiSvKem4IdP8iLII= X-Gm-Gg: Acq92OGEd3KM6fR5Tp4+Z9v2ShVLOTbdN2/cNUUP0xR2EWTVQrim/fNoZm3MFVVkYVs 1funx3VuYQAKiJsKKN+lGnItW5TnscOXNC1Ht3xA8n0+8YslrAWWNH2KjEKmjaUXxjylLsEQ+7k gTTELSToFtZ3motQ548wkG8m+wwqV4NOhmOsJuyHmoFXxf5EydVEQIqfJdmOvqsgA87Dr6fSKB/ XUkcl2Wd4Z/Q+/zuHwAY/nXS2uhDC37migK5QaDozU5UCY7ylutqzqFdVKwKY09nGa55zrSUZ/i wa5xXxl7aUN1/fkY X-Received: by 2002:a05:690e:130b:b0:652:f6aa:f73c with SMTP id 956f58d0204a3-65df830c830mr7666305d50.62.1778776521134; Thu, 14 May 2026 09:35:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:7011:8aca:10b0:518:89ce:84 with HTTP; Thu, 14 May 2026 09:35:19 -0700 (PDT) In-Reply-To: References: <177685804902.403059.7237129094698721575@wrigleys.postgresql.org> From: "David G. Johnston" Date: Thu, 14 May 2026 09:35:19 -0700 X-Gm-Features: AVHnY4KwlyzystkA5v7c6iBgyDKtWiF4fViYp92G41fJWy12q1ychdO0vAjROkA Message-ID: Subject: Re: Please clarify that Timestamp with Timezone doesn't preserve the timezone. To: Richard Neill Cc: Bruce Momjian , "github@richardneill.org" , "pgsql-docs@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000ad56e60651c9ae79" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000ad56e60651c9ae79 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wednesday, May 13, 2026, Richard Neill wrote: > > > No, I think doesn't. That's probably the root of the confusion. > > Using "timestamp without timezone" could be interpreted as: > > "Armistice Day is at 11:00 on 11/11 in UTC" > (and we'll intentionally overlook the formatting of this to bodge it > for display in different timezones as if it were local) Sure, but that isn=E2=80=99t how it is documented. Timestamp without timez= one has no timezone context so interpreting it as =E2=80=9Cin utc=E2=80=9D is not j= ustified by the docs. > So I actually think there are 4 data-types we need to distinguish: > > 1. timestamp (a UTC value, where the user must do the timezone conversio= n > if they want it) Doesn=E2=80=99t exist, don=E2=80=99t see it being added. > > 2. timestamptz (a UTC value, where the database does the conversion > implicitly for your configured local timezone, or explicitly if you ask) Done. > > 3. timestamp_and_timezone (a struct, which contains timestamp, AND the > timezone (or longitude) of the human who recorded it) Not in core. > 4. timestamp_civil (a date and time which is always local, and cannot be > expressed as a single UTC value). This might be achievable as a compound = of > date+time. This is what already exists in timestamp. > > Of these, (3) doesn't exist, and probably should, hence my original bug > report, and (4) is commonly achieved by mis-using (1), but that's a logic= al > bug because the types are incompatible. A valid perspective but not one shared by the project. The absence of 3 is not a bug. > >> 3. While the docs caution against using "time with timezone", they don't >>> recommend whether to use "timestamp" or "timestamptz" as the default. >>> Such a >>> recommendation might be helpful. >>> >> >> Uh, I guess it depends on what the user wants. Should we make a clear >> recommendation? >> > > Yes. I think the recommendation should probably be something like. I=E2=80=99m not against examples of common usages and documenting gotchas b= ut they have to be in line with the design we have. As you noted, however, both timestamp and timestamptz exist because data in the world fall into the two categories - local time and point-in-time. David J. --000000000000ad56e60651c9ae79 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wednesday, May 13, 2026, Richard Neill <rjn@richardneill.org> wrote:

So I actually think there are 4 data-types we need to distinguish:
<= br> 1. timestamp=C2=A0 (a UTC value, where the user must do the timezone conver= sion if they want it)

Doesn=E2=80=99t exist= , don=E2=80=99t see it being added.
=C2=A0

2. timestamptz (a UTC value, where the database does the conversion implici= tly for your configured local timezone, or explicitly if you ask)

Done.
=C2=A0

3. timestamp_and_timezone (a struct, which contains timestamp, AND the time= zone (or longitude) of the human who recorded it)

Not in core.


4. timestamp_civil (a date and time which is always local, and cannot be ex= pressed as a single UTC value). This might be achievable as a compound of d= ate+time.

This is what already exists in ti= mestamp.
=C2=A0

Of these, (3) doesn't exist, and probably should, hence my original bug= report, and (4) is commonly achieved by mis-using (1), but that's a lo= gical bug because the types are incompatible.

A valid perspective but not one shared by the project.=C2=A0 The absence= of 3 is not a bug.



3. While the docs caution against using "time with timezone", the= y don't
recommend whether to use "timestamp" or "timestamptz" a= s the default. Such a
recommendation might be helpful.

Uh, I guess it depends on what the user wants.=C2=A0 Should we make a clear=
recommendation?

Yes. I think the recommendation should probably be something like.

I=E2=80=99m not against examples of common usages a= nd documenting gotchas but they have to be in line with the design we have.=

As you noted, however, both timestamp and tim= estamptz exist because data in the world fall into the two categories - loc= al time and point-in-time.

David J.

=
--000000000000ad56e60651c9ae79--