Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Varchar truncating question
It is a surprise if the database refuses to insert a row, because the data is
too big for the column.
But it is also a surprise if the data you entered is truncated, and this
surprise might go unnoticed. Imagine that the next text string is just a couple
of character too long "I don't have the money now, but tomorrow I will pay you
$1000"
I would instruct the developer to handle overflow situations and give him/her the responsibility of truncating.
Gert-Jan
Steffen Göck wrote:
> > The trigger should work, although it'll slow down update/insert
> > transactions on the database.
> I think the loss of time is in the range of nanoseconds. you won´t see any
> real difference.
>
> > If you're doing custom development,
> > developers should have enough discipline to use a SUBSTR in their own
> > code.
> you still have illusions? :-)
>
> in my mind, as much as possible constraints and rules should be placed in
> the database. it is much more secure.
>
> all the more security in the database, you will have less bad suprises when
> your system goes in production.
>
> excuse my bad english
> Steffen
-- (Please reply only to the newsgroup)Received on Wed Aug 30 2000 - 15:26:02 CDT
![]() |
![]() |