From 6f58115dddfa8ca63004c4784f57ef660422861d Mon Sep 17 00:00:00 2001 From: Thomas G. Lockhart Date: Fri, 28 Sep 2001 08:09:14 +0000 Subject: 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. --- src/include/access/xact.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/include/access') 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); -- cgit v1.2.3