CompilandoPostgreSQLEnWindows: foo.c

File foo.c, 333 bytes (added by MarianoReingart, 21 months ago)

Extención de prueba (lenguaje C)

Line 
1/* path=%path%;C:\MinGW\bin;C:\msys\1.0\bin */
2
3#include "postgres.h"
4#include <string.h>
5#include "fmgr.h"
6
7#ifdef PG_MODULE_MAGIC
8PG_MODULE_MAGIC;
9#endif
10
11/* by value */
12
13PG_FUNCTION_INFO_V1(add_one);
14
15Datum
16add_one(PG_FUNCTION_ARGS)
17{
18    int32   arg = PG_GETARG_INT32(0);
19
20    PG_RETURN_INT32(arg + 1);
21}