Explicit constants
You can enter a constant of an arbitrary type by using either of
the following notations:
type 'string'CAST ('string' AS type)
The system passes the string text to the input conversion routine for the type called type. The result is a constant of the indicated type. You can omit the explicit type cast if there is no ambiguity as to the type the constant must be (for example, when it is passed as an argument to a non-overloaded function), in which case it is automatically coerced.
You can also specify a type coercion by using a function-like syntax:
typename ('string')You can use CAST() and function-call syntaxes to specify runtime type conversions of arbitrary expressions. But, you can only use the form type 'string' to specify the type of a literal constant.