Re: Dynamic loading of C functions

From: "Jasbinder Bali" <jsbali(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Dynamic loading of C functions
Date: 2006-06-20 21:25:37
Message-ID: a47902760606201425l5916b1f5q6fe5a23db346039e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

yes, i've named it as .so file.

On 6/20/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "Jasbinder Bali" <jsbali(at)gmail(dot)com> writes:
> >>> /usr/include/pgsql/server/ is exactly the path where test_func object
> >>> file resides.
>
> Hmmm .... when you say "object file", do you mean it's really named
> "test_func.o"?
>
> If so, that's both the wrong name and the wrong type of file. Postgres
> is looking for a shared library, eg "test_func.so" (or on some platforms
> ".sl" or ".dylib"). There's some advice in our manual about the
> compiler switches to use to create a shared library, or see your
> compiler documentation.
>
> Given AS '/usr/include/pgsql/server/test_func', Postgres will look for
> both "test_func" and "test_func.so" (not sure which order, try the LOAD
> reference page for details). It won't look for "test_func.o" though.
>
> BTW, most people would say that /usr/include is exactly where NOT to
> put an executable file ... conventionally this kind of file goes under
> /usr/lib. That's not what's causing your problem, it's just a question
> of keeping your filesystem tidy enough to be able to find things again.
>
> regards, tom lane
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Erin Sheldon 2006-06-20 21:27:43 Re: Dynamic loading of C functions
Previous Message Tom Lane 2006-06-20 21:24:15 Re: Dynamic loading of C functions