Thread: error msg about stored procedures and relations not existing...

error msg about stored procedures and relations not existing...

From
"Bill Thomason"
Date:

Hi,

 

I have Postgres 7.3.2 running on a Mandrake Linux 9.0 box.  I have a series a defined tables and two stored procedures defined in a database.

 

I have some java code that makes a remote connection and will call the stored procedures and insert the returned values along with data through the jdbc connection.

 

Whenever I do an insert I will get messages such as:

 

ERROR:  Relation "image" does not exist

 

where image is one of several tables.

 

I get the following message concerning the stored procedures:

 

ERROR:  Function get_next_local_id(integer) does not exist

        Unable to identify a function that satisfies the given argument types

        You may need to add explicit typecasts

 

This is but one of two stored procedures.  This one is called before the other one so I will suspect that even if the first one is called correctly the second one will suffer the same fate.

 

If I manually connect to the database using psql, all of the tables and the stored procedures exist.  All table have the proper permissions for the connecting user from my java app to select,insert,append,delete row entries from the tables.

 

I have granted executable privileges for the connecting user on the stored procedure.

 

Is there anything else I am missing or should be checking for?

 

I did have all of this running on a SPARC system running 7.1.2, for what it’s worth.

 

Thanks in advance,

-Bill Thomason

Re: error msg about stored procedures and relations not existing...

From
Per-Olof Norén
Date:
Bill Thomason wrote:

> Hi,
>
>
>
> I have Postgres 7.3.2 running on a Mandrake Linux 9.0 box.  I have a
> series a defined tables and two stored procedures defined in a database.
>
>
>
> I have some java code that makes a remote connection and will call the
> stored procedures and insert the returned values along with data
> through the jdbc connection.
>
>
>
> Whenever I do an insert I will get messages such as:
>
>
>
> ERROR:  Relation "image" does not exist
>
>
>
> where image is one of several tables.
>
>
>
> I get the following message concerning the stored procedures:
>
>
>
> ERROR:  Functionget_next_local_id(integer) does not exist
>
>         Unable to identify a function that satisfies the given
> argument types
>
>         You may need to add explicit typecasts
>
Something like this usually happens to me if I´m calling a procedure
with a value that is really of another datatype, eg bigint.
An example:
insert into atable (global_id, local_id)
values (1234, get_next_local_id(7832173878937128))

This might not translate into a call to get_next_local_id(integer), but
rather a call  get_next_local_id(bigint)
a typed called would look something like
get_next_local_id(3123123213123123::integer)


Just my 2 cents...
Regards,
Per-Olof