Postgres 和临时表

发布于 2024-12-25 02:02:31 字数 145 浏览 2 评论 0原文

我有一个使用临时表的存储过程,并在完成后显式删除它。

当两个不同的会话同时运行相同的过程时会发生什么?会话作为单用户(webapp)运行。

一个会话是否会干扰其他会话的临时表及其内部数据?

我正在使用 Postgres 9.0。

I have a stored procedure that use temp table and explicitly drops it when done.

What happed when same procedure is run at same time by 2 different sessions? Sessions are run as single user (webapp).

Will one session interfere with temp table, and data inside it, of other session?

I'm using Postgres 9.0.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

驱逐舰岛风号 2025-01-01 02:02:31

在postgresql 临时表对于每个会话都是唯一的,所以没问题。

In postgresql temporary tables are unique for each session, so no problem.

疯了 2025-01-01 02:02:31

如果我没有完全错的话,结果将是在生成临时表的过程中每个查询都有一个临时表,因此两个临时表不会互相干扰。

If I am not totally wrong, the result would be one temp table per query in your procedure which generates the temp table, so the two temp tables would not disturb eachother.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文