Re: calling function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: calling function
Дата
Msg-id 22336.1078382451@sss.pgh.pa.us
обсуждение исходный текст
Ответ на calling function  ("William Anthony Lim" <wei.liang@eudoramail.com>)
Список pgsql-sql
"William Anthony Lim" <wei.liang@eudoramail.com> writes:
> create or replace function testcall(int4,varchar,bool,int2) return setof record as '
> ...
> select * from testcall(12,'ABCD',true,20000);
> ERROR:  function testcall(integer, "unknown", boolean, integer) does not exist

An undecorated integer constant is considered int4 (or int8 or numeric
if large enough), and there's no automatic downcast to int2.  You could
write 20000::int2 or some such, but on the whole I'd recommend declaring
the function to take int4 not int2.
        regards, tom lane


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

Предыдущее
От: "William Anthony Lim"
Дата:
Сообщение: calling function
Следующее
От: Achilleus Mantzios
Дата:
Сообщение: Re: Encoding bytea