/*
- * send SimpleQuery message to a node.
+ * send simple query message to a node.
*/
POOL_STATUS send_simplequery_message(POOL_CONNECTION *backend, int len, char *string, int major)
{
if (pool_write_and_flush(backend, string, len) < 0)
{
+ pool_error("send_simplequery_message: failed to send query: %s", string);
return POOL_END;
}
pool_debug("do_query: kind: %c", kind);
+ if (kind == 'E')
+ {
+ char *message;
+
+ if (pool_extract_error_message(false, backend, major, true, &message))
+ {
+ pool_log("do_query: error message from backend %s", message);
+ }
+ }
+
if (major == PROTO_MAJOR_V3)
{
if (pool_read(backend, &len, sizeof(len)) < 0)