Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTud1-0000Zm-SK for pgsql-general@arkaria.postgresql.org; Fri, 15 Jun 2018 19:43:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fTud0-0008NU-9F for pgsql-general@arkaria.postgresql.org; Fri, 15 Jun 2018 19:43:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTucz-0008ND-UF for pgsql-general@lists.postgresql.org; Fri, 15 Jun 2018 19:43:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTuct-0001ds-Cr for pgsql-general@postgresql.org; Fri, 15 Jun 2018 19:43:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w5FJhEIt000316; Fri, 15 Jun 2018 15:43:14 -0400 From: Tom Lane To: Jeremy Finzel cc: Postgres General Subject: Re: Clarifying "timestamp with time zone" In-reply-to: References: Comments: In-reply-to Jeremy Finzel message dated "Fri, 15 Jun 2018 14:24:08 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <314.1529091794.1@sss.pgh.pa.us> Date: Fri, 15 Jun 2018 15:43:14 -0400 Message-ID: <315.1529091794@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jeremy Finzel writes: > We often prefer to use timestamptz or "timestamp with time zone" in our > environment because of its actually storing "objective time" with respect > to UTC. But in my own work experience, I have scarcely encountered a case > where business users, and software engineers, do not actually think it > means the opposite. Yeah, it's confusing :-(. > I do believe this is part of the SQL standard, Actually not, or at least the standard thinks the type should behave differently from this. They think it should store a local timestamp and then separately a GMT offset. The way it works in PG was dreamed up ~20 years ago by Tom Lockhart, and in retrospect it was not a great idea for him to have used the SQL-standard type name for something with not-SQL-standard behavior. However, at this point, it's not clear how we could change it without causing truly enormous backwards-compatibility pain. If it were a fringe-usage type, maybe we could get away with a renaming, but it's certainly not that. > So it seems to me that "timestamp with time zone" is a misnomer in a big > way, and perhaps it's worth at least clarifying the docs about this, Don't the docs describe the behavior pretty clearly already? regards, tom lane