aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/timestamp.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2006-04-25 00:25:22 +0000
committerBruce Momjian <bruce@momjian.us>2006-04-25 00:25:22 +0000
commite6004f01518bb7c9c2c1fdf7e5fa4fa4a3e572f3 (patch)
treede46c5948ecbb3ef7e833d0c349ddb449ba94926 /src/backend/utils/adt/timestamp.c
parentf04080d73b64ea24f7c12ffda43ee605cb2e4a8c (diff)
downloadpostgresql-e6004f01518bb7c9c2c1fdf7e5fa4fa4a3e572f3.tar.gz
postgresql-e6004f01518bb7c9c2c1fdf7e5fa4fa4a3e572f3.zip
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/backend/utils/adt/timestamp.c')
-rw-r--r--src/backend/utils/adt/timestamp.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index 0524bf12394..fd40c1ebfdd 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.162 2006/03/06 22:49:16 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.163 2006/04/25 00:25:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -920,6 +920,18 @@ now(PG_FUNCTION_ARGS)
}
Datum
+statement_timestamp(PG_FUNCTION_ARGS)
+{
+ PG_RETURN_TIMESTAMPTZ(GetCurrentStatementStartTimestamp());
+}
+
+Datum
+clock_timestamp(PG_FUNCTION_ARGS)
+{
+ PG_RETURN_TIMESTAMPTZ(GetCurrentTimestamp());
+}
+
+Datum
pgsql_postmaster_start_time(PG_FUNCTION_ARGS)
{
PG_RETURN_TIMESTAMPTZ(PgStartTime);