From: | Richard Huxton <richardh(at)archonet(dot)com> |
---|---|
To: | "Johann Zuschlag" <zuschlag(at)online(dot)de>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Why does this not work? |
Date: | 2002-04-11 17:59:06 |
Message-ID: | 200204111859.06242.richardh@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Johann Zuschlag | 2002-04-11 18:06:24 | Re: Why does this not work? |
Previous Message | Stephan Szabo | 2002-04-11 17:58:58 | Re: SPI_execp() failed in RI_FKey_cascade_del() |