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 1geoks-0006nV-Bt for pgsql-general@arkaria.postgresql.org; Wed, 02 Jan 2019 22:12:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1geokr-00007Q-1K for pgsql-general@arkaria.postgresql.org; Wed, 02 Jan 2019 22:12:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1geokq-00007J-PM for pgsql-general@lists.postgresql.org; Wed, 02 Jan 2019 22:12:48 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1geoko-0007cb-Bj for pgsql-general@postgresql.org; Wed, 02 Jan 2019 22:12:48 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id EF0959934A for ; Wed, 2 Jan 2019 14:12:42 -0800 (PST) Date: Wed, 2 Jan 2019 14:12:42 -0800 (PST) From: Rich Shepard To: pgsql-general@postgresql.org Subject: Re: Default for date field: today vs CURRENT_DATE [RESOLVED] In-Reply-To: <10029.1546466474@sss.pgh.pa.us> Message-ID: References: <10029.1546466474@sss.pgh.pa.us> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, 2 Jan 2019, Tom Lane wrote: > 'today' is special as a date input string, so you can use it as a literal: > > regression=# select 'today'::date; > date > ------------ > 2019-01-02 > (1 row) > > But it's not a SQL keyword, nor a function name, so you can't write it > without quotes. Tom, Now I understand. I tried it with quotes, too, but this was in the table definition, not as a selection criterion. I did not pick up this difference when reading about the date-time data types. Thanks very much for clarifying. Best regards, Rich