TIMESTAMP - Mailing list pgsql-docs

From J Lumby
Subject TIMESTAMP
Date
Msg-id DM6PR06MB5562B1FF2E945511D3079101A3600@DM6PR06MB5562.namprd06.prod.outlook.com
Whole thread Raw
Responses Re: TIMESTAMP  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: docs: psql and variable interpolation
Next
From: Tom Lane
Date:
Subject: Re: TIMESTAMP