OSDN Git Service

Update copyright to 2004.
[pg-rex/syncrep.git] / src / include / access / heapam.h
index 34f1241..103a9c6 100644 (file)
@@ -4,10 +4,10 @@
  *       POSTGRES heap access method definitions.
  *
  *
- * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: heapam.h,v 1.83 2003/08/04 02:40:10 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.91 2004/08/29 04:13:03 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -111,11 +111,12 @@ extern Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
                                fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \
                ) \
                : \
-                       heap_getsysattr((tup), (attnum), (isnull)) \
+                       heap_getsysattr((tup), (attnum), (tupleDesc), (isnull)) \
        ) \
 )
 
-extern Datum heap_getsysattr(HeapTuple tup, int attnum, bool *isnull);
+extern Datum heap_getsysattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
+                                                        bool *isnull);
 
 
 /* ----------------
@@ -129,6 +130,7 @@ extern Datum heap_getsysattr(HeapTuple tup, int attnum, bool *isnull);
 /* heapam.c */
 
 extern Relation relation_open(Oid relationId, LOCKMODE lockmode);
+extern Relation conditional_relation_open(Oid relationId, LOCKMODE lockmode, bool nowait);
 extern Relation relation_openrv(const RangeVar *relation, LOCKMODE lockmode);
 extern Relation relation_openr(const char *sysRelationName, LOCKMODE lockmode);
 extern void relation_close(Relation relation, LOCKMODE lockmode);
@@ -148,6 +150,9 @@ extern HeapTuple heap_getnext(HeapScanDesc scan, ScanDirection direction);
 extern bool heap_fetch(Relation relation, Snapshot snapshot,
                   HeapTuple tuple, Buffer *userbuf, bool keep_buf,
                   PgStat_Info *pgstat_info);
+extern bool heap_release_fetch(Relation relation, Snapshot snapshot,
+                  HeapTuple tuple, Buffer *userbuf, bool keep_buf,
+                  PgStat_Info *pgstat_info);
 
 extern ItemPointer heap_get_latest_tid(Relation relation, Snapshot snapshot,
                                        ItemPointer tid);
@@ -155,9 +160,9 @@ extern void setLastTid(const ItemPointer tid);
 
 extern Oid     heap_insert(Relation relation, HeapTuple tup, CommandId cid);
 extern int heap_delete(Relation relation, ItemPointer tid, ItemPointer ctid,
-                       CommandId cid);
+                       CommandId cid, Snapshot crosscheck, bool wait);
 extern int heap_update(Relation relation, ItemPointer otid, HeapTuple tup,
-                       ItemPointer ctid, CommandId cid);
+                       ItemPointer ctid, CommandId cid, Snapshot crosscheck, bool wait);
 extern int heap_mark4update(Relation relation, HeapTuple tup,
                                 Buffer *userbuf, CommandId cid);
 
@@ -179,9 +184,9 @@ extern XLogRecPtr log_heap_move(Relation reln, Buffer oldbuf,
                          Buffer newbuf, HeapTuple newtup);
 
 /* in common/heaptuple.c */
-extern Size ComputeDataSize(TupleDesc tupleDesc, Datum *value, char *nulls);
+extern Size ComputeDataSize(TupleDesc tupleDesc, Datum *values, char *nulls);
 extern void DataFill(char *data, TupleDesc tupleDesc,
-                Datum *value, char *nulls, uint16 *infomask,
+                Datum *values, char *nulls, uint16 *infomask,
                 bits8 *bit);
 extern int     heap_attisnull(HeapTuple tup, int attnum);
 extern Datum nocachegetattr(HeapTuple tup, int attnum,
@@ -189,9 +194,14 @@ extern Datum nocachegetattr(HeapTuple tup, int attnum,
 extern HeapTuple heap_copytuple(HeapTuple tuple);
 extern void heap_copytuple_with_tuple(HeapTuple src, HeapTuple dest);
 extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor,
-                          Datum *value, char *nulls);
+                          Datum *values, char *nulls);
 extern HeapTuple heap_modifytuple(HeapTuple tuple,
-               Relation relation, Datum *replValue, char *replNull, char *repl);
+                                                                 Relation relation,
+                                                                 Datum *replValues,
+                                                                 char *replNulls,
+                                                                 char *replActions);
+extern void heap_deformtuple(HeapTuple tuple, TupleDesc tupleDesc,
+                                                        Datum *values, char *nulls);
 extern void heap_freetuple(HeapTuple tuple);
 extern HeapTuple heap_addheader(int natts, bool withoid, Size structlen, void *structure);