Re: Function does not exist

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Function does not exist
Дата
Msg-id 162867790907160344i4995a2dxa02382e14ee47ee8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Function does not exist  ("dipesh mistry (Imap)" <dipesh.mistry@mobilefundas.com>)
Ответы Re: Function does not exist
Список pgsql-general
2009/7/16 dipesh mistry (Imap) <dipesh.mistry@mobilefundas.com>:
> Hello,
>
> In my function i had defined addnewuser(integer,character,......), and i
> call this function by Java code.
>
> I had created function with integer datatype but database always gives me
> error,
> org.postgresql.util.PSQLException: ERROR: function
> addnewuser(bigint,character varying,....) does not exist
>
> Why database gives me bigint error instead i had declare integer in
> function.
>
> Next i create one more function named adduser(bigint,character,....).
> but then it gives me same error.

are all others parameters really varchar? You can use explicit cast to
varchar like

SELECT addnewuser(19, 'bbbb'::varchar, 'aaaaa'::varchar, ....

regards
Pavel Stehule

>
> --
> Thanks,
> Dipesh
> If you are not confident, you are doing a trial run.
>
>
> Pavel Stehule wrote:
>>
>> Hello
>>
>> it's look like problem with casting. You defined function
>> name(integer,...) but you call it with bigint param. Bigint cannot be
>> casted to int - so you have to redefine your func - name(bigint, ...
>>
>> regards
>> Pavel Stehule
>>
>> 2009/7/15 dipesh mistry (Imap) <dipesh.mistry@mobilefundas.com>:
>>
>>>
>>> Hello,
>>>
>>> I have create my own function name "addnewuser(integer,varchar.....)",
>>> and when I call this function it gives me below error,
>>>
>>> org.postgresql.util.PSQLException: ERROR: function addnewuser(bigint,
>>> character varying, character varying, character varying, character
>>> varying,
>>> character varying, character varying, unknown, character varying,
>>> character
>>> varying, character varying, character varying, character varying,
>>> character
>>> varying, character varying, character varying, character varying,
>>> character
>>> varying, character varying, character varying, integer) does not exist
>>>
>>> Even though function exist why it gives me this error, we use
>>> postgres-8.3.7
>>> latest.
>>> We install postgres by .tar,gz file.
>>>
>>> --
>>> Thanks,
>>> Dipesh
>>> If you can't make a mistake, you can't make anything.
>

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Problems with 8.4, FLOAT8PASSBYVAL and x86_64 GNU/Linux
Следующее
От: Janning Vygen
Дата:
Сообщение: suggestion: log_statement = sample