summaryrefslogtreecommitdiff
path: root/src/include/access
diff options
context:
space:
mode:
authorPeter Eisentraut2003-11-06 22:08:15 +0000
committerPeter Eisentraut2003-11-06 22:08:15 +0000
commit96889392e915e5c77384d274db2a2c42b684c274 (patch)
tree06f115dec005a18d591bf4a389391a84cf6cef00 /src/include/access
parent144a2ecd57590c6cce9981a2b28cee5f5805bd5d (diff)
Implement isolation levels read uncommitted and repeatable read as acting
like the next higher one.
Diffstat (limited to 'src/include/access')
-rw-r--r--src/include/access/xact.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index d95c3df7945..33a95bad997 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: xact.h,v 1.57 2003/10/16 16:50:41 tgl Exp $
+ * $Id: xact.h,v 1.58 2003/11/06 22:08:15 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,14 +22,20 @@
/*
* Xact isolation levels
*/
-#define XACT_DIRTY_READ 0 /* not implemented */
+#define XACT_READ_UNCOMMITTED 0
#define XACT_READ_COMMITTED 1
-#define XACT_REPEATABLE_READ 2 /* not implemented */
+#define XACT_REPEATABLE_READ 2
#define XACT_SERIALIZABLE 3
extern int DefaultXactIsoLevel;
extern int XactIsoLevel;
+/*
+ * We only implement two distinct levels, so this is a convenience to
+ * check which level we're really using internally.
+ */
+#define IsXactIsoLevelSerializable ((XactIsoLevel == XACT_REPEATABLE_READ || XactIsoLevel == XACT_SERIALIZABLE))
+
/* Xact read-only state */
extern bool DefaultXactReadOnly;
extern bool XactReadOnly;