aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/large_object.h
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1996-07-09 06:22:35 +0000
committerMarc G. Fournier <scrappy@hub.org>1996-07-09 06:22:35 +0000
commitd31084e9d1118b25fd16580d9d8c2924b5740dff (patch)
tree3179e66307d54df9c7b966543550e601eb55e668 /src/backend/storage/large_object.h
downloadpostgresql-PG95-1_01.tar.gz
postgresql-PG95-1_01.zip
Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01
Diffstat (limited to 'src/backend/storage/large_object.h')
-rw-r--r--src/backend/storage/large_object.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/backend/storage/large_object.h b/src/backend/storage/large_object.h
new file mode 100644
index 00000000000..177d2c26e47
--- /dev/null
+++ b/src/backend/storage/large_object.h
@@ -0,0 +1,58 @@
+/*-------------------------------------------------------------------------
+ *
+ * large_object.h--
+ * file of info for Postgres large objects. POSTGRES 4.2 supports
+ * zillions of large objects (internal, external, jaquith, inversion).
+ * Now we only support inversion.
+ *
+ * Copyright (c) 1994, Regents of the University of California
+ *
+ * $Id: large_object.h,v 1.1.1.1 1996/07/09 06:21:53 scrappy Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef LARGE_OBJECT_H
+#define LARGE_OBJECT_H
+
+#include "c.h"
+#include "utils/rel.h"
+#include "access/relscan.h"
+
+/*
+ * This structure will eventually have lots more stuff associated with it.
+ */
+typedef struct LargeObjectDesc
+{
+ Relation heap_r; /* heap relation */
+ Relation index_r; /* index relation on seqno attribute */
+ IndexScanDesc iscan; /* index scan we're using */
+ TupleDesc hdesc; /* heap relation tuple desc */
+ TupleDesc idesc; /* index relation tuple desc */
+ uint32 lowbyte; /* low byte on the current page */
+ uint32 highbyte; /* high byte on the current page */
+ uint32 offset; /* current seek pointer */
+ ItemPointerData htid; /* tid of current heap tuple */
+
+#define IFS_RDLOCK (1 << 0)
+#define IFS_WRLOCK (1 << 1)
+#define IFS_ATEOF (1 << 2)
+
+ u_long flags; /* locking info, etc */
+} LargeObjectDesc;
+
+/*
+ * Function definitions...
+ */
+
+/* inversion stuff in inv_api.c */
+extern LargeObjectDesc *inv_create(int flags);
+extern LargeObjectDesc *inv_open(Oid lobjId, int flags);
+extern void inv_close(LargeObjectDesc *obj_desc);
+extern int inv_destroy(Oid lobjId);
+extern int inv_stat(LargeObjectDesc *obj_desc, struct pgstat *stbuf);
+extern int inv_seek(LargeObjectDesc *obj_desc, int offset, int whence);
+extern int inv_tell(LargeObjectDesc *obj_desc);
+extern int inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes);
+extern int inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes);
+
+#endif /* LARGE_OBJECT_H */