如何在PostgreSQL事务中获得实时信息? [英] How to get a real time within PostgreSQL transaction?

查看:88
本文介绍了如何在PostgreSQL事务中获得实时信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我了解, now()在整个PostgreSQL事务中返回的时间相同?
但是如何获取真实时间?

As far as I understand now() returns the same time during the whole PostgreSQL transaction? But how to get real time?

我还想知道是否有任何配置参数来限制交易时间,所以在此期间到期交易将立即失败或以其他方式禁止后续查询?

Also, I am interested if there any configuration parameter to limit duration of transaction, so that after this period expiration transaction would immediately fail or somehow else prohibit following queries?

推荐答案

Timeofday()

可能对您有用。

这篇关于如何在PostgreSQL事务中获得实时信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆