mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Clean up the rather historically encumbered interface to now() and
current time: provide a GetCurrentTimestamp() function that returns current time in the form of a TimestampTz, instead of separate time_t and microseconds fields. This is what all the callers really want anyway, and it eliminates low-level dependencies on AbsoluteTime, which is a deprecated datatype that will have to disappear eventually.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/access/xact.h,v 1.77 2005/06/17 22:32:48 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/access/xact.h,v 1.78 2005/06/29 22:51:57 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -17,7 +17,7 @@
|
||||
#include "access/xlog.h"
|
||||
#include "storage/relfilenode.h"
|
||||
#include "nodes/pg_list.h"
|
||||
#include "utils/nabstime.h"
|
||||
#include "utils/timestamp.h"
|
||||
|
||||
|
||||
/*
|
||||
@ -140,8 +140,7 @@ extern TransactionId GetCurrentTransactionId(void);
|
||||
extern TransactionId GetCurrentTransactionIdIfAny(void);
|
||||
extern SubTransactionId GetCurrentSubTransactionId(void);
|
||||
extern CommandId GetCurrentCommandId(void);
|
||||
extern AbsoluteTime GetCurrentTransactionStartTime(void);
|
||||
extern AbsoluteTime GetCurrentTransactionStartTimeUsec(int *usec);
|
||||
extern TimestampTz GetCurrentTransactionStartTimestamp(void);
|
||||
extern int GetCurrentTransactionNestLevel(void);
|
||||
extern bool TransactionIdIsCurrentTransactionId(TransactionId xid);
|
||||
extern void CommandCounterIncrement(void);
|
||||
|
Reference in New Issue
Block a user