summaryrefslogtreecommitdiff
path: root/src/include/access
diff options
context:
space:
mode:
authorThomas G. Lockhart2001-09-28 08:09:14 +0000
committerThomas G. Lockhart2001-09-28 08:09:14 +0000
commit6f58115dddfa8ca63004c4784f57ef660422861d (patch)
tree71816e03286e53113ec4b6de337f0b345028a314 /src/include/access
parent1f075a32ee28004251f508f50a4325944801da10 (diff)
Measure the current transaction time to milliseconds.
Define a new function, GetCurrentTransactionStartTimeUsec() to get the time to this precision. Allow now() and timestamp 'now' to use this higher precision result so we now have fractional seconds in this "constant". Add timestamp without time zone type. Move previous timestamp type to timestamp with time zone. Accept another ISO variant for date/time values: yyyy-mm-ddThh:mm:ss (note the "T" separating the day from hours information). Remove 'current' from date/time types; convert to 'now' in input. Separate time and timetz regression tests. Separate timestamp and timestamptz regression test.
Diffstat (limited to 'src/include/access')
-rw-r--r--src/include/access/xact.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index 55c04351177..be5e9db665b 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: xact.h,v 1.36 2001/08/26 16:56:00 tgl Exp $
+ * $Id: xact.h,v 1.37 2001/09/28 08:09:12 thomas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,6 +17,7 @@
#include "access/transam.h"
#include "access/xlog.h"
#include "utils/nabstime.h"
+#include "utils/timestamp.h"
/*
* Xact isolation levels
@@ -39,6 +40,7 @@ typedef struct TransactionStateData
CommandId commandId;
CommandId scanCommandId;
AbsoluteTime startTime;
+ int startTimeMsec;
int state;
int blockState;
} TransactionStateData;
@@ -104,6 +106,7 @@ extern CommandId GetCurrentCommandId(void);
extern CommandId GetScanCommandId(void);
extern void SetScanCommandId(CommandId);
extern AbsoluteTime GetCurrentTransactionStartTime(void);
+extern AbsoluteTime GetCurrentTransactionStartTimeUsec(int *usec);
extern bool TransactionIdIsCurrentTransactionId(TransactionId xid);
extern bool CommandIdIsCurrentCommandId(CommandId cid);
extern bool CommandIdGEScanCommandId(CommandId cid);