作者简介
刘东明,阿里云 PostgreSQL 内核研发工程师,花名凌策。

协议基础
消息



消息类型

case 'Q': * simple query */case 'P': * parse */case 'B': * bind */case 'E': * execute */case 'F': /* fastpath function call */case 'C': /* close */case 'D': /* describe */case 'H': /* flush */case 'S': /* sync */case 'X':case EOF:case 'd': /* copy data */case 'c': /* copy done */case 'f': /* copy fail */
case 'C': /* command complete */case 'E': /* error return */case 'Z': /* backend is ready for new query */case 'I': /* empty query */case '1': /* Parse Complete */case '2': /* Bind Complete */case '3': /* Close Complete */case 'S': /* parameter status */case 'K': /* secret key data from the backend */case 'T': /* Row Description */case 'n': /* No Data */case 't': /* Parameter Description */case 'D': /* Data Row */case 'G': /* Start Copy In */case 'H': /* Start Copy Out */case 'W': /* Start Copy Both */case 'd': /* Copy Data */case 'c': /* Copy Done */case 'R': /* Authentication Request */





'I'; /* idle --- not in transaction */'T'; /* in transaction */'E'; /* in failed transaction */
PREPARE usrrptplan (int) ASSELECT * FROM users u, logs l WHERE u.usrid=$1 AND u.usrid=l.usridAND l.date = $2;EXECUTE usrrptplan(1, current_date);EXECUTE usrrptplan(2, current_date);





Copy 子协议

总结
参考文献
文章转载自君子当盘,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




