aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/execute.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-09-20 12:47:21 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-09-20 12:47:37 -0400
commit96b6c82c9dd4a6a91c7e54bf42d36da111959ec6 (patch)
treeb4f489dd2f6504639cf4e5e521d184ed06041bb9 /src/interfaces/ecpg/ecpglib/execute.c
parentd1b0007639a1cefb5dcecf44999a4461f4c34089 (diff)
downloadpostgresql-96b6c82c9dd4a6a91c7e54bf42d36da111959ec6.tar.gz
postgresql-96b6c82c9dd4a6a91c7e54bf42d36da111959ec6.zip
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
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/execute.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c25
1 files changed, 1 insertions, 24 deletions
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);