Author: Euler Taveira de Oliveira
-
+
Writing A Procedural Language Handler
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
+
PG_FUNCTION_INFO_V1(plsample_call_handler);
Datum
-
+
Triggers
#include "executor/spi.h" /* this is what you need to work with SPI */
#include "commands/trigger.h" /* ... and triggers */
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
+
extern Datum trigf(PG_FUNCTION_ARGS);
PG_FUNCTION_INFO_V1(trigf);
-
+
User-Defined Functions
#include "postgres.h"
#include
+#include "utils/geo_decls.h"
+
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
/* by value */
#include "postgres.h"
#include
#include "fmgr.h"
+#include "utils/geo_decls.h"
+
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
/* by value */
#include "postgres.h"
#include "executor/executor.h" /* for GetAttributeByName() */
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
+
bool
c_overpaid(HeapTupleHeader t, /* the current row of emp */
int32 limit)
#include "postgres.h"
#include "executor/executor.h" /* for GetAttributeByName() */
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
+
PG_FUNCTION_INFO_V1(c_overpaid);
Datum