PostgreSQL在同一连接上有多个事务 [英] PostgreSQL multiple transactions on the same connection

查看:240
本文介绍了PostgreSQL在同一连接上有多个事务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PostgreSQL是否在同一连接上支持多个事务?我不是说嵌套事务,而是不相关的不同事务。

Does PostgreSQL support multiple transactions on the same connection? I don't mean nested transactions, but unrelated different transactions.

推荐答案

如果与不相关,则意味着一个接一个,然后答案是肯定的。

If with unrelated you mean one after the other, then the answer is yes.

如果您的意思是同时打开不同的事务,那么答案是否定的(使用dblink可以进行一些破解,但我认为它们不符合在相同的连接上)。

If you mean having different transactions open at the same time, then the answer is no (there are some hacks available using dblink but I don't think they qualify as "on the same connection).

这篇关于PostgreSQL在同一连接上有多个事务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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