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



Reply via email to