Subject | Re: [firebird-support] Arithmetic Overflow/String Truncation |
---|---|
Author | Helen Borrie |
Post date | 2004-02-07T05:19:42Z |
At 03:12 PM 7/02/2004 +1100, you wrote:
are similar - both are overflows! I've never been able to work out why the
original author called a string overflow a string truncation - since
nothing gets truncated!
of the same generic type of exception. Changing the message would be
really easy.
size? After all, the purpose of data-typing is to ensure that the stored
data fits the specification.
everywhere. That gives you the means to truncate strings and massage
numbers *before* they get thrown at the columns.
Claudio and others have discussed several times providing some kind of
capability to identify the column that the overflow applies to and pass it
up the tube with the exception ID. AFAIU, currently, the structure that
carries the exception data doesn't have provision to do it. It would be
very convenient, though. You can, of course, do it in a stored procedure
now with 1.5 - pass a run-time string attached to an exception, like 'Value
nnnn is too long for column xxx'.
/hb
>It seems to me that Arithmetic Overflow and String Truncation exceptions areActually I agree that this age-old message is plain silly. The exceptions
>quite different in nature but unfortunately they fire the same exception.
are similar - both are overflows! I've never been able to work out why the
original author called a string overflow a string truncation - since
nothing gets truncated!
>Makes it hard to find what the exception is referring to.I haven't heard any talk of making them separate exceptions, since both are
>Is there any talk of making these two things separate exceptions?
of the same generic type of exception. Changing the message would be
really easy.
>Can we notThen wouldn't it be rather pointless to define a column of a specific
>just swallow string truncation exceptions anyway when desired?
size? After all, the purpose of data-typing is to ensure that the stored
data fits the specification.
>While I develop import routines, it's maddening sometimes to track downYeah, I'm a real cynic with data import routines nowadays. CAST()
>what part of the srupid access data is springing this exception on me.
everywhere. That gives you the means to truncate strings and massage
numbers *before* they get thrown at the columns.
Claudio and others have discussed several times providing some kind of
capability to identify the column that the overflow applies to and pass it
up the tube with the exception ID. AFAIU, currently, the structure that
carries the exception data doesn't have provision to do it. It would be
very convenient, though. You can, of course, do it in a stored procedure
now with 1.5 - pass a run-time string attached to an exception, like 'Value
nnnn is too long for column xxx'.
/hb
>