From 9083f26990643adae7c2ecd19ead35c9c323d8b4 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 24 Oct 2019 10:04:15 +0900 Subject: [PATCH] Clarify usage of log_db_error() function --- dbutils.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dbutils.c b/dbutils.c index ea7802e2..ced2e403 100644 --- a/dbutils.c +++ b/dbutils.c @@ -67,6 +67,12 @@ static bool _is_bdr_db(PGconn *conn, PQExpBufferData *output, bool quiet); static void _populate_bdr_node_record(PGresult *res, t_bdr_node_info *node_info, int row); static void _populate_bdr_node_records(PGresult *res, BdrNodeInfoList *node_list); +/* + * This provides a standardized way of logging database errors. Note + * that the provided PGconn can be a normal or a replication connection; + * no attempt is made to write to the database, only to report the output + * of PQerrorMessage(). + */ void log_db_error(PGconn *conn, const char *query_text, const char *fmt,...) {