diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c
index 2d37c6b194be4ca88507c4a77237f4e094782cdd..536c9e1733187c50f3330abb2f35b2360253e5fc 100644
--- a/res/res_config_pgsql.c
+++ b/res/res_config_pgsql.c
@@ -1284,6 +1284,7 @@ static int require_pgsql(const char *database, const char *tablename, va_list ap
 		if (!column) {
 			if (requirements == RQ_WARN) {
 				ast_log(LOG_WARNING, "Table %s requires a column '%s' of size '%d', but no such column exists.\n", tablename, elm, size);
+				res = -1;
 			} else {
 				struct ast_str *sql = ast_str_create(100);
 				char fieldtype[15];