From: Michael Meskes Date: Thu, 1 Sep 2011 13:27:38 +0000 (+0200) Subject: In ecpglib restore LC_NUMERIC in case of an error. X-Git-Tag: REL8_3_16~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12613cb6b83cac1aa1e7882e84902c445fce3e74;p=postgresql In ecpglib restore LC_NUMERIC in case of an error. --- diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 51c5cdf8d8..0c4e0cc730 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -1492,7 +1492,11 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char if (statement_type == ECPGst_prepnormal) { if (!ecpg_auto_prepare(lineno, connection_name, compat, questionmarks, &prepname, query)) + setlocale(LC_NUMERIC, oldlocale); + ecpg_free(oldlocale); + va_end(args); return (false); + } /* * statement is now prepared, so instead of the query we have to