Thread: Stored Procedues in C
Would anyone happen to have any examples or be able to point me to how to write a stored procedure in C? Ive looked at http://www.postgresql.org/docs/8.1/interactive/trigger-interface.html But am still having problems with getting a compile to work on a Linux machine. (linker options etc..) Thanks, Bart
On Wed, Jan 18, 2006 at 10:48:59AM -0600, Bart McFarling wrote: > Would anyone happen to have any examples or be able to point me to how to > write a stored procedure in C? Ive looked at > http://www.postgresql.org/docs/8.1/interactive/trigger-interface.html See also "C-Language Functions": http://www.postgresql.org/docs/8.1/interactive/xfunc-c.html There are examples under the contrib directory in the source code; the smallest ones are probably the easiest to understand. You could also grab some code from PgFoundry or GBorg. http://pgfoundry.org/ http://gborg.postgresql.org/ > But am still having problems with getting a compile to work on a Linux > machine. (linker options etc..) See "Extension Building Infrastructure" in the "C-Language Functions" link above; for examples see the contributed modules' Makefiles. If you still have trouble then please post the details (what you're trying to do, what your Makefile looks like, what error messages you're getting, etc.). -- Michael Fuhr