gpt4 book ai didi

postgresql - 为什么我收不到这个 PG 通知?

转载 作者:行者123 更新时间:2023-11-29 12:13:25 25 4
gpt4 key购买 nike

我使用 rails dbconsole 打开了两个数据库控制台。我在他们两个中发出了以下命令:

listen ninja;

并且,在第二个控制台中,我还写道:

notify ninja;

但是,只有第二个控制台会看到此通知:

NOTIFY
Asynchronous notification "ninja" received from server process with PID 16837.

为什么两个控制台都没有收到通知?我可以做一些设置让他们都收到吗?

最佳答案

我不知道 rails dbconsole,但是使用 psql 程序直到下次执行命令时才会显示通知,因为通知是拉取的,而不是推送的,并且控制台不会不断地轮询它们不活跃。我假设 dbconsole 是相似的。

关于postgresql - 为什么我收不到这个 PG 通知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18985257/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com