Remove remaining bits of Bernard's postgres dispense
[uccvend-vendserver.git] / sql-edition / syslog / pg_syslog.c
diff --git a/sql-edition/syslog/pg_syslog.c b/sql-edition/syslog/pg_syslog.c
deleted file mode 100644 (file)
index 1dbdc85..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <syslog.h>
-#include <postgres.h>
-#include <miscadmin.h>
-#include <libpq/libpq-be.h>
-#include <fmgr.h>
-
-PG_FUNCTION_INFO_V1(logmsg);
-Datum logmsg(PG_FUNCTION_ARGS) {
-       text* arg0;
-       char* msg;
-       int len;
-
-       arg0 = PG_GETARG_TEXT_P(0);
-       len = arg0->vl_len - VARHDRSZ;
-
-       msg = (char*) palloc(len+1);
-       memcpy(msg, arg0->vl_dat, len);
-       msg[len] = '\0';
-
-       openlog("postgres", LOG_PID, LOG_LOCAL6);
-       syslog(LOG_INFO, "[%s]: %s", GetUserNameFromId(GetUserId()), msg);
-       closelog();
-
-       pfree(msg);
-
-       /* not reached */
-       PG_RETURN_VOID();
-}

UCC git Repository :: git.ucc.asn.au