From 8703a0516f92819ea97d991984540332c061fe17 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 22 Jul 2020 21:47:42 +0200 Subject: ensure psql fails hard if there is an error in the SQL (fixes #6437) --- src/pq/pq_connect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/pq/pq_connect.c') diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c index e3a610922..881a158bb 100644 --- a/src/pq/pq_connect.c +++ b/src/pq/pq_connect.c @@ -172,6 +172,8 @@ apply_patch (struct GNUNET_PQ_Context *db, "-f", buf, "-q", + "--set", + "ON_ERROR_STOP=1", NULL); if (NULL == psql) { @@ -415,7 +417,7 @@ GNUNET_PQ_reconnect (struct GNUNET_PQ_Context *db) db->load_path)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Failed to load SQL statements from `%s'\n", + "Failed to load SQL statements from `%s*'\n", db->load_path); PQfinish (db->conn); db->conn = NULL; -- cgit v1.2.3