PostgreSQL学习第十四篇 listen与notify
来源:互联网 发布:个人收支软件app 编辑:程序博客网 时间:2024/06/09 21:56
PostgreSQL提供了client端之间通过服务器端进行消息通信的机制。这种机制是通过listen和notify命令来完成的。session1:postgres=# listen postgres;LISTENpostgres=# listen limingpostgres-# ;LISTENsession2:postgres=# notify postgres,'hello word';NOTIFYpostgres=# notify liming,'hello liming';NOTIFYpostgres=#session1;postgres=# select 1; --随便执行了一个命令 ?column?---------- 1(1 row)Asynchronous notification "postgres" with payload "hello word" received from server process with PID 12241.Asynchronous notification "liming" with payload "hello liming" received from server process with PID 12241.postgres=# listen和notify的相关命令:1. listen:监听消息通道2. unlisten:取消先前的监听3. notify:发送消息到消息通道中4. pg_notify():与notify命令功能相同5. pg_listening_channels():调用此函数可以查询当前session已注册了哪些消息监听
0 0
- PostgreSQL学习第十四篇 listen与notify
- 姚博文 postgresql listen/notify push message
- C/C++日常学习总结(第十四篇)C++基类与派生类的转换
- struts2第十四讲学习笔记,手动验证与框架验证
- OPAL学习笔记 - Start Listen
- [LWIP学习]--listen函数分析
- Listen
- listen
- Listen
- listen()
- 并发学习笔记(三):join与wait/notify
- php学习 第十四节
- PostgreSQL学习笔记1 - 安装与配置
- PostgreSQL学习第二篇--安装
- PostgreSQL学习篇10.1 模式
- PostgreSQL学习篇10.2 表
- [黑马IOS自学第十四篇]Foundation框架学习
- cocos2dx学习之路----第十四篇(内存管理机制)
- cc2640官方demo更新连接参数service-CCservice
- CmakeLists实践(2)
- Effective Java读书笔记八:序列化(74-78)
- HBase Shell 常用命令及例子
- Hanoi 塔问题
- PostgreSQL学习第十四篇 listen与notify
- play framework学习笔记之Model类的使用及JPA entity manager
- 【BZOJ 3505】[Cqoi2014]数三角形 组合数学
- Apache Commons工具集简介
- 项目开发纪要,为了提高开发效率和质量
- 获取user
- android常用正则表达式
- C动态内存分配
- Java 单例模式的写法