diff options
| author | Bruce Momjian <bruce@momjian.us> | 2006-04-25 00:25:22 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2006-04-25 00:25:22 +0000 |
| commit | e6004f01518bb7c9c2c1fdf7e5fa4fa4a3e572f3 (patch) | |
| tree | de46c5948ecbb3ef7e833d0c349ddb449ba94926 /src/include | |
| parent | f04080d73b64ea24f7c12ffda43ee605cb2e4a8c (diff) | |
| download | postgresql-e6004f01518bb7c9c2c1fdf7e5fa4fa4a3e572f3.tar.gz | |
Add statement_timestamp(), clock_timestamp(), and
transaction_timestamp() (just like now()).
Also update statement_timeout() to mention it is statement arrival time
that is measured.
Catalog version updated.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/xact.h | 4 | ||||
| -rw-r--r-- | src/include/catalog/catversion.h | 4 | ||||
| -rw-r--r-- | src/include/catalog/pg_proc.h | 8 | ||||
| -rw-r--r-- | src/include/utils/timestamp.h | 4 |
4 files changed, 15 insertions, 5 deletions
diff --git a/src/include/access/xact.h b/src/include/access/xact.h index da2455f68f..6591ba0456 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xact.h,v 1.81 2006/03/24 04:32:13 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/xact.h,v 1.82 2006/04/25 00:25:19 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -141,6 +141,8 @@ extern TransactionId GetCurrentTransactionIdIfAny(void); extern SubTransactionId GetCurrentSubTransactionId(void); extern CommandId GetCurrentCommandId(void); extern TimestampTz GetCurrentTransactionStartTimestamp(void); +extern TimestampTz GetCurrentStatementStartTimestamp(void); +extern void SetCurrentStatementStartTimestamp(void); extern int GetCurrentTransactionNestLevel(void); extern bool TransactionIdIsCurrentTransactionId(TransactionId xid); extern void CommandCounterIncrement(void); diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index a88d3cfd59..11b02f691a 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.323 2006/04/22 01:26:01 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/catversion.h,v 1.324 2006/04/25 00:25:20 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200604211 +#define CATALOG_VERSION_NO 200604241 #endif diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 9542d632f2..61339eadad 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.405 2006/04/05 22:11:55 tgl Exp $ + * $PostgreSQL: pgsql/src/include/catalog/pg_proc.h,v 1.406 2006/04/25 00:25:20 momjian Exp $ * * NOTES * The script catalog/genbki.sh reads this file and generates .bki @@ -1614,6 +1614,12 @@ DATA(insert OID = 1298 ( timetzdate_pl PGNSP PGUID 14 f f t f i 2 1184 "1266 DESCR("convert time with time zone and date to timestamp with time zone"); DATA(insert OID = 1299 ( now PGNSP PGUID 12 f f t f s 0 1184 "" _null_ _null_ _null_ now - _null_ )); DESCR("current transaction time"); +DATA(insert OID = 2647 ( transaction_timestamp PGNSP PGUID 12 f f t f s 0 1184 "" _null_ _null_ _null_ now - _null_ )); +DESCR("current transaction time"); +DATA(insert OID = 2648 ( statement_timestamp PGNSP PGUID 12 f f t f s 0 1184 "" _null_ _null_ _null_ statement_timestamp - _null_ )); +DESCR("current statement time"); +DATA(insert OID = 2649 ( clock_timestamp PGNSP PGUID 12 f f t f v 0 1184 "" _null_ _null_ _null_ clock_timestamp - _null_ )); +DESCR("current clock time"); /* OIDS 1300 - 1399 */ diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index 9747b300b6..4e9e0c3f6f 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.59 2006/03/06 22:49:17 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.60 2006/04/25 00:25:22 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -284,6 +284,8 @@ extern Datum timestamptz_trunc(PG_FUNCTION_ARGS); extern Datum timestamptz_part(PG_FUNCTION_ARGS); extern Datum now(PG_FUNCTION_ARGS); +extern Datum statement_timestamp(PG_FUNCTION_ARGS); +extern Datum clock_timestamp(PG_FUNCTION_ARGS); extern Datum pgsql_postmaster_start_time(PG_FUNCTION_ARGS); |
