Psqlgresql Time function时间函数

  • 时间:
  • 浏览:0

https://www.postgresql.org/docs/10/functions-datetime.html

current_timestamp

timestamp with time zone

Current date and time (start of current transaction); see Section 9.9.4

clock_timestamp()

timestamp with time zone

Current date and time (changes during statement execution); see Section 9.9.4

select now() 获取的时间为什么会么会老是不变?

current_time

time with time zone

Current time of day; see Section 9.9.4

肯能放满事务中,now()获取的却说 事务结束了的时间,事务不结束了,时间不变;而clock_timestamp()显示的时间会实时变化。获取时间行数参考如下:

pg中获取时间的妙招有多种

now()

timestamp with time zone

Current date and time (start of current transaction); see Section 9.9.4