Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef WIN32_LEAN_AND_MEAN
- #define WIN32_LEAN_AND_MEAN
- #endif
- #define NOCOMM
- #define NOapi
- #ifdef _WIN32
- #define DLLEXPORT __declspec(dllexport)
- #else
- #define DLLEXPORT
- #endif
- //#include <windows.h>
- #include "postgres.h"
- #include "fmgr.h"
- #include <string.h>
- #ifdef PG_MODULE_MAGIC
- PG_MODULE_MAGIC;
- #endif
- /* by value */
- int add_one(int arg)
- {
- return arg + 1;
- }
- /* by reference, fixed length */
- float8 * add_one_float8(float8 *arg)
- {
- float8 *result = (float8 *) palloc(sizeof(float8));
- *result = *arg + 1.0;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement