TIMESTAMP

Поиск
Список
Период
Сортировка
От J Lumby
Тема TIMESTAMP
Дата
Msg-id DM6PR06MB5562B1FF2E945511D3079101A3600@DM6PR06MB5562.namprd06.prod.outlook.com
обсуждение исходный текст
Ответы Re: TIMESTAMP
Список pgsql-docs
I am curious about the syntactic nature of the expression :


TIMESTAMP '2020-07-13'


in this expression,  is the token TIMESTAMP a function, typecast,  or other?

I don't see a description of it as a function and there are no 
parentheses in this example.

But this expression also doesn't seem to conform to the described forms 
for a typecast.

I do see this text in the description of typecast :

-----------------------------------------------------------------------------------------------------

It is also possible to specify a type cast using a function-like syntax:

typename ( expression )

----------------------------------------------------------------------------------------------------- 


which also lists some types which can be used this way,  including 
timestamp, but this description implies that parentheses are mandatory 
and also says that in the case of timestamp the name must be double-quoted.


I also tried

FLOAT8 '7.3'

and that is accepted as well.     So maybe the above syntax description 
should indicate that parentheses are optional?


Or if not,  where in the documentation is this syntax described?



Cheers,   John Lumby




В списке pgsql-docs по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: docs: psql and variable interpolation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TIMESTAMP