Re: ERROR: could not find function

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: vishal saberwal <vishalsaberwal(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: could not find function
Date: 2005-12-12 19:49:11
Message-ID: 20051212194857.GC30160@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Dec 12, 2005 at 10:08:12AM -0800, vishal saberwal wrote:
> hi all,
> I am having problems creating functions. Though i can still replace the
> already existing functions that i had created a while back in postgres
> 7.4.5.Now I am running postgres
> 8.0.1.
>
> The code below compiles without errrors.
> gcc -Wall -I /root/postgresql-8.0.1/src/include -shared
> -Wl,-soname,resource_test.so.1 -o resource_test.so resource_test.c
>
> The error is:
> xy_db=# create or replace function Export_Resource_Select(text,text,text)
> returns text as
> xy_db-# '/root/resource_test.so' language 'c';
> ERROR: could not find function "export_resource_select" in file
> "/root/resource_test.so"

The error is probably due to your function being called
"Export_Resource_Select", which is not what you told postgres. C is
absolutly not case-insensetive. So you should specify the function name
directly.

create or replace function Export_Resource_Select(text,text,text)
returns text as 'Export_Resource_Select','/root/resource_test.so' language 'c';

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jerry LeVan 2005-12-12 20:14:07 OpenOffice 2 and Postgresql 8.1 How to?
Previous Message vishal saberwal 2005-12-12 18:45:26 Re: ERROR: could not find function