Skip to content

Instantly share code, notes, and snippets.

@inklesspen
Created May 17, 2009 03:34
Show Gist options
  • Save inklesspen/112906 to your computer and use it in GitHub Desktop.
Save inklesspen/112906 to your computer and use it in GitHub Desktop.
#include "postgres.h"
#include "executor/spi.h"
#include "commands/trigger.h"
#include "fmgr.h"
#include "access/heapam.h"
#include "utils/syscache.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
PG_MODULE_MAGIC;
Datum pltestlang_call_handler(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(pltestlang_call_handler);
Datum
pltestlang_call_handler(PG_FUNCTION_ARGS)
{
int32 arg1 = PG_GETARG_INT32(0);
int32 arg2 = PG_GETARG_INT32(1);
PG_RETURN_INT32(arg1+arg2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment