aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/be-fsstubs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/libpq/be-fsstubs.c')
-rw-r--r--src/backend/libpq/be-fsstubs.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c
index 8ecf45fe122..5267cf40abe 100644
--- a/src/backend/libpq/be-fsstubs.c
+++ b/src/backend/libpq/be-fsstubs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.21 1998/06/15 19:28:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.22 1998/07/21 04:17:23 momjian Exp $
*
* NOTES
* This should be moved to a more appropriate place. It is here
@@ -41,6 +41,8 @@
#include <storage/large_object.h>
#include <libpq/be-fsstubs.h>
+/* [PA] is Pascal André <andre@via.ecp.fr> */
+
/*#define FSDB 1*/
#define MAX_LOBJ_FDS 256
@@ -52,7 +54,6 @@ static GlobalMemory fscxt = NULL;
static int newLOfd(LargeObjectDesc *lobjCookie);
static void deleteLOfd(int fd);
-
/*****************************************************************************
* File Interfaces for Large Objects
*****************************************************************************/
@@ -367,6 +368,26 @@ lo_export(Oid lobjId, text *filename)
return 1;
}
+/*
+ * lo_commit -
+ * prepares large objects for transaction commit [PA, 7/17/98]
+ */
+void
+_lo_commit(void)
+{
+ int i;
+ MemoryContext currentContext;
+
+ currentContext = MemoryContextSwitchTo((MemoryContext) fscxt);
+
+ for (i = 0; i < MAX_LOBJ_FDS; i++) {
+ if (cookies[i] != NULL) inv_cleanindex(cookies[i]);
+ }
+
+ MemoryContextSwitchTo(currentContext);
+
+}
+
/*****************************************************************************
* Support routines for this file