智慧交通 App 开发如何提升城市交通管理与用户出行体验
908
2022-11-13
PG服务进程(Postgres)——idle告诉前端准备好接受查询
ReadyForQuery启动完成。 前端现在可以发出命令。ReadyForQuery 消息与后端在每个命令周期后发出的消息相同。 根据前端的编码需求,将 ReadyForQuery 视为开始一个命令周期,或将 ReadyForQuery 视为结束启动阶段和每个后续命令周期是合理的。The ReadyForQuery message is the same one that the backend will issue after each command cycle. Depending on the coding needs of the frontend, it is reasonable to consider ReadyForQuery as starting a command cycle, or to consider ReadyForQuery as ending the start-up phase and each subsequent command cycle.
void ReadyForQuery(CommandDest dest) { switch (dest) { case DestRemote: case DestRemoteExecute: case DestRemoteSimple: if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 3) { StringInfoData buf; pq_beginmessage(&buf, 'Z'); pq_sendbyte(&buf, TransactionBlockStatusCode()); pq_endmessage(&buf); } else pq_putemptymessage('Z'); /* Flush output at end of cycle in any case. */ pq_flush(); break; case DestNone: case DestDebug: case DestSPI: case DestTuplestore: case DestIntoRel: case DestCopyOut: case DestSQLFunction: case DestTransientRel: case DestTupleQueue: break; }}
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~