Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlHIg-0005ZB-V7 for pgsql-docs@arkaria.postgresql.org; Wed, 10 Jul 2019 18:26:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hlHIf-0002rA-HC for pgsql-docs@arkaria.postgresql.org; Wed, 10 Jul 2019 18:26:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlHIf-0002jX-5e for pgsql-docs@lists.postgresql.org; Wed, 10 Jul 2019 18:26:41 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlHIc-0005xp-Ho; Wed, 10 Jul 2019 18:26:39 +0000 Received: from bruce by momjian.us with local (Exim 4.89) (envelope-from ) id 1hlHIb-0006mH-HY; Wed, 10 Jul 2019 14:26:37 -0400 Date: Wed, 10 Jul 2019 14:26:37 -0400 From: Bruce Momjian To: "Jonathan S. Katz" Cc: David Harper , Tom Lane , pgsql-docs@lists.postgresql.org Subject: Re: Ambiguous language in Table 8.13. Special Date/Time Inputs [EXT] Message-ID: <20190710182637.25x6hxi4o7bht336@momjian.us> References: <156258047907.1181.11324468080514061996@wrigleys.postgresql.org> <20190709033234.ytbltfn25h5wvdbd@momjian.us> <8B4735A4-7B46-406A-B4F1-CBFA47D5E1BC@sanger.ac.uk> <20190709154825.egarmx2s5jyvft4e@momjian.us> <25367.1562687915@sss.pgh.pa.us> <1DC28BBD-A4B8-4083-AC83-BD5B012FF3B1@sanger.ac.uk> <74c7b4d4-5c0c-29a2-89aa-9395a38e0633@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74c7b4d4-5c0c-29a2-89aa-9395a38e0633@postgresql.org> User-Agent: NeoMutt/20170113 (1.7.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Jul 10, 2019 at 01:32:31PM -0400, Jonathan Katz wrote: > On 7/10/19 6:13 AM, David Harper wrote: > >> I actually agree with your opinion that "midnight" is fine. > >> That text has been that way for over fifteen years[1], and > >> nobody's complained before that it was ambiguous. > > > > Conversely, how many users over the past fifteen years have read that table, and then felt compelled (as I did) to run a query such as > > > > select 'today'::timestamp,'yesterday'::timestamp,'tomorrow'::timestamp; > > > > on their PostgreSQL cluster to clear the ambiguity for themselves? > > I've heard of one, but only just recently :) > > If we were to s/midnight/00:00:00/ we'd probably want to do it > everywhere midnight appears. This occurs in a few places in the docs: > > https://www.postgresql.org/docs/current/functions-formatting.html (SSSS) > https://www.postgresql.org/docs/current/protocol-replication.html > (XlogData section) > > and there are some various code comments as well. > > Count me as a +0 vote, as I've always interpreted it the way Bruce & Tom > said upthread, but if we want to change it I can write a patch. The thing I don't like about 00:00:00 is that it is a lot of information to say "the start of the day", while I assumed midnight was clear on that. If we can find a way to say "start of the day (midnight)", that would work. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +