Re: Calling 'c' function from PostGreSQL

From: Nabil Sayegh <evolution(at)sayegh(dot)de>
To: Atul <atulk(at)newgen(dot)co(dot)in>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Calling 'c' function from PostGreSQL
Date: 2001-04-09 11:21:20
Message-ID: 20010409112117.8626114EE62@gerstung3.net-lab.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 09 Apr 2001 16:17:08 +0530, Atul wrote:
> Is it possible to call a language 'C' function from a PL/pgSQL function. I have the following code:
>
> // file myfunc.c
> #include "postgres.h"
>
> text* myfunc();
>
> text* myfunc()
> {
> text* ch;
> *ch = '1,2';
> return ch;
> }
>
> // C file ends here

Did you compile it with -fPIC ?

--
Nabil Sayegh

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message manoj garg 2001-04-10 11:15:39 how to run postgre on winNT
Previous Message Atul 2001-04-09 10:47:08 Calling 'c' function from PostGreSQL