Re: Why does this not work?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Why does this not work?
Дата
Msg-id 200204111859.06242.richardh@archonet.com
обсуждение исходный текст
Ответ на Why does this not work?  ("Johann Zuschlag" <zuschlag@online.de>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Mr. Wobbet"
Дата:
Сообщение: help me please...
Следующее
От: Oliver Elphick
Дата:
Сообщение: Re: How do I list all users and all databases.