PostgreSQL STATEMENT TIMESTAMP Function

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PostgreSQL STATEMENT_TIMESTAMP() function

STATEMENT_TIMESTAMP() function

This function is used to get current date and time (start of current transaction).

Syntax :

statement_timestamp()

Return Type : timestamp with time zone

PostgreSQL Version : 9.3

Pictorial Presentation of PostgreSQL STATEMENT_TIMESTAMP() function

Example : PostgreSQL STATEMENT_TIMESTAMP() function

SELECT statement_timestamp();

Output :

    statement_timestamp
----------------------------
 2015-01-15 14:30:28.322-08
(1 row)

N.B. - The outputs may change during the execution for the current date.