Search Postgresql Archives

Re: help needed (which group do I post these questions to?)

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

 



On Thu, Apr 06, 2006 at 05:39:00PM -0700, Bit Byter wrote:
> 1). Does anyone know how to execute a stored procedure (i.e. PL/PGSQL
> function), using libpq, and passing it parameters?. An example will be
> superb, as I have not managed to find one that does this after about a
> week of Googling.

SELECT myfunction(arg1, arg2);   -- for simple function
SELECT * FROM myfunction(arg1, arg2);  -- for set returning functions


> 2). I have written some C extensions to the server (user defined
> functions), these work fine on Limux. I now wnat to eb able to
> recompile my code to a shared library so that I can use my UDF in my
> Windows (PG 8.1) installation. I cannot seem to find any examples that
> show how this can be done. Do I need the cygwin tools or can I build
> the dll using VC++?

You need to use the exact same setup as used to build the server. I'm
unsure how this is done in Windows, there was some discussion about
compatability, but the easiest is to grab the source and compile both
the server and extensions within that.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: signature.asc
Description: Digital signature


[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