Subject RE: [Firebird-Architect] Another plea for clearer error messages...
Author Claudio Valderrama C.
Dimitry Sibiryakov wrote:
> On 27 Oct 2004 at 23:33, Claudio Valderrama C. wrote:
>
>> "Unknown datatype" happens probably with parameters. What do you want
>> to do with it? Named parameters are mostly a client side facility.
>> Most RDBMS products use only "?" to signal a parameter.
>
> I'd prefer to see at least parameter position. And, probably, some
> additional info. I.e. something like this: "Value type is wrong for
> parameter 3. Expected string got integer."

Point taken, although I suspect the problem happens at compile time rather
than at execution time. At compile time, we never can resolve
cast(:param as data_type)
and resolution of
timestamp_var - :param
is ambiguous unless we have enough context to decide whether this is a
subtraction of two timestamps (producing an exact numeric) or a timestamp
minus a value that can be plain integer (we are going backwards N days) or
exact precision (we are going to change the time portion, too).

C.