From: selkovjr.mcs.anl.gov@mcs.anl.gov
To: tolik@icomm.ru
To: pgsql-general@postgreSQL.org
Subject: Re: [GENERAL] Trying to make functions in 'C'
Date: Mon, 17 May 1999 12:00:00 -0400
Message-ID: <199905171658.LAA10439@antares.mcs.anl.gov> (raw)
In-Reply-To: <87n1z46vmn.fsf@tolikus.hq.aaanet.ru>
> >>>>> "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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: selkovjr.mcs.anl.gov@mcs.anl.gov, tolik@icomm.ru
Subject: Re: [GENERAL] Trying to make functions in 'C'
In-Reply-To: <199905171658.LAA10439@antares.mcs.anl.gov>
References: <87n1z46vmn.fsf@tolikus.hq.aaanet.ru> <199905171658.LAA10439@antares.mcs.anl.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox