summaryrefslogtreecommitdiff
path: root/contrib/lo
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/lo')
-rw-r--r--contrib/lo/lo.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/contrib/lo/lo.c b/contrib/lo/lo.c
index 953659305f..6bd2430931 100644
--- a/contrib/lo/lo.c
+++ b/contrib/lo/lo.c
@@ -9,13 +9,11 @@
#include "commands/trigger.h"
#include "executor/spi.h"
-#include "libpq/be-fsstubs.h"
+#include "utils/builtins.h"
#include "utils/rel.h"
PG_MODULE_MAGIC;
-#define atooid(x) ((Oid) strtoul((x), NULL, 10))
-
/*
* This is the trigger that protects us from orphaned large objects
@@ -82,7 +80,7 @@ lo_manage(PG_FUNCTION_ARGS)
char *newv = SPI_getvalue(newtuple, tupdesc, attnum);
if (orig != NULL && (newv == NULL || strcmp(orig, newv) != 0))
- DirectFunctionCall1(lo_unlink,
+ DirectFunctionCall1(be_lo_unlink,
ObjectIdGetDatum(atooid(orig)));
if (newv)
@@ -102,7 +100,7 @@ lo_manage(PG_FUNCTION_ARGS)
if (orig != NULL)
{
- DirectFunctionCall1(lo_unlink,
+ DirectFunctionCall1(be_lo_unlink,
ObjectIdGetDatum(atooid(orig)));
pfree(orig);