On Thursday 11 April 2002 17:38, Johann Zuschlag wrote:
> "test1" varchar(10)
> CREATE FUNCTION "laenge"() RETURNS "opaque" AS '
> begin
> if length(new.test1) > 10 then
...
> insert into test (test1) values ('0123456789012');
>
> value too long for type character varying(10)
I believe it's the parser being helpful and checking data-types as early as
possible. You can see why - if "new.test1" is a varchar(10) how _can_ it hold
any more.
You might want to look in the mail archives. Someone mentioned this very
problem not long ago.
- Richard Huxton