calling a C function from pgsql function - Mailing list pgsql-general

From tamanna madaan
Subject calling a C function from pgsql function
Date
Msg-id CAD4qJ_Lq-u=guDQgRgEUsS_RzUEwOsSrpfz4W4cbHD2tKZZ6Gg@mail.gmail.com
Whole thread Raw
Responses Re: calling a C function from pgsql function  (Craig Ringer <ringerc@ringerc.id.au>)
Re: calling a C function from pgsql function  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
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 is a C library function  returning an int
test1(arg2);
test1(arg3);

end;

Now, my questions are :

1. what are the ways to get  the value returned by this library function . 
2. when test1 is called, will it wait for "test1" to return before continuing with the next statement in "test" or it will continue with the next statement parallely while "test1" is being executed.
3. Moreover, will test1  be called sequentially in order for all the three arguments i.e arg1 first and arg3 in last. Or there can be a different order.

Thanks..
Tamanna








--

 Tamanna | Associate Consultant
GlobalLogic Inc. | Innovation by Design
ARGENTINA | CHILE | CHINA | INDIA | ISRAEL | UKRAINE | UK | USA
Office:  0120-4062000  x 2971


pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Views versus user-defined functions: formatting, comments, performance, etc.
Next
From: Merlin Moncure
Date:
Subject: Re: PQfformat question and retrieving bytea data in C