Re: [GENERAL] Function does not exist

2009-07-18 Thread Sim Zacks
DIPESH WROTE:
> 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
Please paste in the full definition of the function and the function
call. (Use debug mode to see what is actually being passed to the
database).
I agree with Andreas that the problem is the parameters in the actual
function call is wrong.
If you look at the error, the 8th parm being passed in is an unknown.
What is it supposed to be?

Sim

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Function does not exist

2009-07-16 Thread Andreas Wenk

Pavel Stehule schrieb:

2009/7/16 Andreas Wenk :

Pavel Stehule schrieb:

2009/7/16 dipesh mistry (Imap) :

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, ''::varchar, 'a'::varchar, 

Pavel,

just a question. Why should it be necessary to add explicit typcasting here?
I can't see the problem in more depth. I still think that the function is
called with the wrong parameter. Would be cool to hear your points to
understand the problem better ;-)


ofcourse - explicit casting is hard method, and it's better don't use
it. But some times java environments are too smart. Explicit cast
should help with searching an problematic param.

Pavel


Thanks Pavel, then I suggest to first get the function running in psql and then check it 
in the Java environment ... if this has not be done allready ;-)


Cheers

Andy



Another idea to be sure that the function is working correctly is to call
the function in psql and see if an error is thrown ... if yes its a paramter
problem. If no its an external problem (I think this is called by a Java app
... isn't it?).

Cheers

Andy



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) :


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.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Function does not exist

2009-07-16 Thread Pavel Stehule
2009/7/16 Andreas Wenk :
> Pavel Stehule schrieb:
>>
>> 2009/7/16 dipesh mistry (Imap) :
>>>
>>> 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, ''::varchar, 'a'::varchar, 
>
> Pavel,
>
> just a question. Why should it be necessary to add explicit typcasting here?
> I can't see the problem in more depth. I still think that the function is
> called with the wrong parameter. Would be cool to hear your points to
> understand the problem better ;-)

ofcourse - explicit casting is hard method, and it's better don't use
it. But some times java environments are too smart. Explicit cast
should help with searching an problematic param.

Pavel

>
> Another idea to be sure that the function is working correctly is to call
> the function in psql and see if an error is thrown ... if yes its a paramter
> problem. If no its an external problem (I think this is called by a Java app
> ... isn't it?).
>
> Cheers
>
> Andy
>
>
>> 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) :

> 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.
>>
>

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Function does not exist

2009-07-16 Thread Andreas Wenk

Pavel Stehule schrieb:

2009/7/16 dipesh mistry (Imap) :

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, ''::varchar, 'a'::varchar, 


Pavel,

just a question. Why should it be necessary to add explicit typcasting here? I can't see 
the problem in more depth. I still think that the function is called with the wrong 
parameter. Would be cool to hear your points to understand the problem better ;-)


Another idea to be sure that the function is working correctly is to call the function in 
psql and see if an error is thrown ... if yes its a paramter problem. If no its an 
external problem (I think this is called by a Java app ... isn't it?).


Cheers

Andy



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) :


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.




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Function does not exist

2009-07-16 Thread Pavel Stehule
2009/7/16 dipesh mistry (Imap) :
> 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, ''::varchar, 'a'::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) :
>>
>>>
>>> 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.
>

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Function does not exist

2009-07-16 Thread dipesh mistry (Imap)

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.

--
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) :
  

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.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Function does not exist

2009-07-15 Thread Pavel Stehule
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) :
> 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.
>

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Function does not exist

2009-07-15 Thread ANdreas Wenk

dipesh mistry (Imap) wrote:

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.


Hi,

I suppose you are setting the wrong parameter when calling this 
function. If you use psql use the short cut command \df to get all 
functions you built and check this again ... such an error message is 
mostly a hint that something with the params is wrong ...


Cheers

Andy

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Function does not exist

2009-07-15 Thread dipesh mistry (Imap)

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.