From 96b6c82c9dd4a6a91c7e54bf42d36da111959ec6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 20 Sep 2019 12:47:21 -0400 Subject: Revert "Add DECLARE STATEMENT support to ECPG." This reverts commit bd7c95f0c1a38becffceb3ea7234d57167f6d4bf, along with assorted follow-on fixes. There are some questions about the definition and implementation of that statement, and we don't have time to resolve them before v13 release. Rather than ship the feature and then have backwards-compatibility concerns constraining any redesign, let's remove it for now and try again later. Discussion: https://postgr.es/m/TY2PR01MB2443EC8286995378AEB7D9F8F5B10@TY2PR01MB2443.jpnprd01.prod.outlook.com --- src/interfaces/ecpg/ecpglib/execute.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'src/interfaces/ecpg/ecpglib/execute.c') diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index de5c43a4602..7c9cb760a99 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -2280,32 +2280,9 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char { va_list args; bool ret; - const char *real_connection_name = NULL; - - real_connection_name = connection_name; - - if (!query) - { - ecpg_raise(lineno, ECPG_EMPTY, ECPG_SQLSTATE_ECPG_INTERNAL_ERROR, NULL); - return false; - } - - /* Handle the EXEC SQL EXECUTE... statement */ - if (ECPGst_execute == st) - { - real_connection_name = ecpg_get_con_name_by_declared_name(query); - if (real_connection_name == NULL) - { - /* - * If can't get the connection name by declared name then using - * connection name coming from the parameter connection_name - */ - real_connection_name = connection_name; - } - } va_start(args, query); - ret = ecpg_do(lineno, compat, force_indicator, real_connection_name, + ret = ecpg_do(lineno, compat, force_indicator, connection_name, questionmarks, st, query, args); va_end(args); -- cgit v1.2.3