Search Postgresql Archives

Re: Dynamic loading of C functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Was the object compiled on the same architecture as postgres?
Sometimes when one is compiled on a 64-bit, the other on 32-bit,
or two wildly different versions of gcc, I have seen this cryptic "No such
file or directory".

Erin

On 6/20/06, Jasbinder Bali <jsbali@xxxxxxxxx> wrote:

chmod 666 filename is something i've done to give permissions to all..
still doesn't work.



On 6/20/06, Bill Moran <wmoran@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> In response to "Jasbinder Bali" <jsbali@xxxxxxxxx>:
>
> > I've written a function in C, compiled it and trying to use the same
> > function in one of my postgres functions like this:
> >
> > CREATE FUNCTION add_one(integer) RETURNS integer
> >      AS '/usr/include/pgsql/server/test_func, 'add_one'
> >      LANGUAGE C STRICT
> >
> > test_func is the name of my object file and add_one is the name of
> > the function i want to call from test_func.c  C file.
> >
> > I get the follwing error
> > ERROR:  could not access file
"/usr/include/pgsql/server/test_func": No such
> > file or directory
> >
> > /usr/include/pgsql/server/ is exactly the path where test_func object
file
> > resides.
> > Don't know why isn't postgres able to find it there.
> >
> > Any kind of help would be appreciated.
>
> Check the permissions.  Can the Postgres user read the file?
>
> I don't remember if it has to be marked executable or not, but that's
> something to check.
>
> --
> Bill Moran
> Collaborative Fusion Inc.
>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux