1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

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.
This commit is contained in:
Bruce Momjian
2006-04-25 00:25:22 +00:00
parent f04080d73b
commit e6004f0151
9 changed files with 180 additions and 64 deletions

View File

@ -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 $
*
*-------------------------------------------------------------------------
*/
@ -919,6 +919,18 @@ now(PG_FUNCTION_ARGS)
PG_RETURN_TIMESTAMPTZ(GetCurrentTransactionStartTimestamp());
}
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)
{