Psqlgresql Time function时间函数

  • 时间:
  • 浏览:0
  • 来源:神彩UU直播现场_彩神UU直播现场官方

now()

timestamp with time zone

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

可能放上去事务中,now()获取的要是 事务结速英语 英语 的时间,事务不结速英语 英语 ,时间不变;而clock_timestamp()显示的时间会实时变化。获取时间行数参考如下:

current_timestamp

timestamp with time zone

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

select now() 获取的时间为哪几个一直不变?

clock_timestamp()

timestamp with time zone

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

current_time

time with time zone

Current time of day; see Section 9.9.4

pg中获取时间的最好的办法有多种

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