From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Bit Byter <takashi_949(at)hotmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: help needed (which group do I post these questions to?) |
Date: | 2006-04-07 13:12:25 |
Message-ID: | 20060407131225.GD22799@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)svana(dot)org> 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-04-07 13:46:01 | Re: case insensitive match in unicode |
Previous Message | User Roman | 2006-04-07 13:06:08 | Re: Use functions in Pl/Perl language |