> After you have written a functions.c file, how do you> compile it how postgres wants it with gcc?
Well. It depends on your OS.Under OpenBSD works
gcc -fpic -c -o file.o file.cld -Bshareable -o file.so file.c
info gcc should help you.
--Alexey