| От | selkovjr.mcs.anl.gov@mcs.anl.gov |
|---|---|
| Тема | Re: [GENERAL] Trying to make functions in 'C' |
| Дата | |
| Msg-id | 199905171658.LAA10439@antares.mcs.anl.gov обсуждение |
| Ответ на | Re: [GENERAL] Trying to make functions in 'C' (tolik@icomm.ru (Anatoly K. Lasareff)) |
| Список | pgsql-general |
> >>>>> "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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера