Re: Default for date field: today vs CURRENT_DATE [RESOLVED]

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Default for date field: today vs CURRENT_DATE [RESOLVED]
Дата
Msg-id alpine.LNX.2.20.1901021410140.20959@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Default for date field: today vs CURRENT_DATE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Default for date field: today vs CURRENT_DATE
Следующее
От: Mihalidesová Jana
Дата:
Сообщение: [unixODBC]Unrecognized key passed to SQLGetInfo. {S1C00,NativeErr =209}