組み込み関数
testdb=# SELECT extract(minute from now());
date_part
-----------
37
(1 row)
testdb=# SELECT date_part('minute', current_timestamp);
date_part
-----------
38
(1 row)
現在の日時
testdb=# SELECT statement_timestamp();
statement_timestamp
-------------------------------
2022-03-12 23:12:08.999592+09
(1 row)
testdb=# SELECT clock_timestamp();
clock_timestamp
-------------------------------
2022-03-12 23:13:11.861113+09
(1 row)