Re: Default for date field: today vs CURRENT_DATE [RESOLVED] - Mailing list pgsql-general

From Rich Shepard
Subject Re: Default for date field: today vs CURRENT_DATE [RESOLVED]
Date
Msg-id alpine.LNX.2.20.1901021410140.20959@salmo.appl-ecosys.com
Whole thread Raw
In response to Re: Default for date field: today vs CURRENT_DATE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Default for date field: today vs CURRENT_DATE
Next
From: Mihalidesová Jana
Date:
Subject: [unixODBC]Unrecognized key passed to SQLGetInfo. {S1C00,NativeErr =209}