Re: Where is the char and varchar length in pg_catalog for function input variables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Where is the char and varchar length in pg_catalog for function input variables
Дата
Msg-id 19559.1346861104@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Where is the char and varchar length in pg_catalog for function input variables  (jam3 <jamorton3@gmail.com>)
Список pgsql-general
jam3 <jamorton3@gmail.com> writes:
> I have searched and searched and just cannot find the maximum lengths for
> input variables in a function

> CREATE FUNCTION test(input1 char(5), input2 varchar(50))
> RETURNS void AS
> $$RAISE NOTICE('%,%'), $1, $2;$$
> LANGUAGE plpgsql;

> Where do I find the 5 and the 50 it has to be somewhere

No, it doesn't have to be, and it isn't.  As far as PG is concerned,
the inputs to this function are just of type "char" and "varchar".
You're allowed to write extra decoration but it's ignored.

            regards, tom lane


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

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: "Too far out of the mainstream"
Следующее
От: Pavan Deolasee
Дата:
Сообщение: Re: Where is the char and varchar length in pg_catalog for function input variables