1、獲取當時完整時間
select now();
postgres=# select now();
now
-------------------------------
2018-11-01 15:28:10.956994+08
(1 row)
2、獲取當前日期
select current_date;
postgres=# select current_date;
current_date
--------------
2018-11-01
(1 row)
3、獲取當前時間
postgres=# select current_time;
current_time
-------------------
15:31:35.68233+08
(1 row)