I have checked the below description in one post: If the timestamp parameter is given, the jdbc does not know if it is to be used timestamp or timestamptz. The jdbc driver passes it to the server as an unknown data type letting the server figure out what to do with it. Example: timestampcol = ? or if you're inserting into a timestamp field so the server can determine the datatype of parameter being used at, in this case since its just being sent back to the user the server cannot determine the data type. so we need to typecast it. "SELECT ?::timestamp"