> >>>>> "fb" == fabian baena <fabbaena@hotmail.com> writes:
>
> fb> I'm tying to learn how to make function in 'C'.
> fb> I'm trying to compile a program I made in 'C'.
> fb> The function I made looks like this:
>
> fb> #include "postgres.h"
>
> fb> int
> fb> add_one(int arg)
> fb> {
> fb> return arg + 1;
> fb> }
>
> Pehaps not 'int', but 'int4' in argument and return type? Except this
> I think your example is right.
As far as return types, make sure you get what you want by
checking how types are typedef'ed in postgres.h
The safest way to add your own code would be what Fabian is trying to
accomplish -- by using the prototypes from tutorial.
--Gene