Re: [GENERAL] calling a C function from pgsql function

2012-08-29 Thread Pavel Stehule
Hello see http://www.postgresql.org/docs/9.1/static/xfunc-c.html plpgsql can call any sql function, so you have to register your C function as custom postgresql sql function Regards Pavel Stehule 2012/8/29 tamanna madaan : > Hi All > > I have created a function in C language . This is to be ca

Re: [GENERAL] calling a C function from pgsql function

2012-08-29 Thread Craig Ringer
On 08/29/2012 09:18 PM, tamanna madaan wrote: 1. what are the ways to get the value returned by this library function . You need to wrap the C library function with a PostgreSQL C extension that uses the fmgr.h APIs, so it's callable from SQL and can return a result to SQL. See: http:

[GENERAL] calling a C function from pgsql function

2012-08-29 Thread tamanna madaan
Hi All I have created a function in C language . This is to be called from a pgsql function . Let say the C language function name is "test1" and pgsql function name is "test" . test1 is called from test three times with different arguments . For example : test () begin test1(arg1);--test1