diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-09-20 12:47:21 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-09-20 12:47:37 -0400 |
commit | 96b6c82c9dd4a6a91c7e54bf42d36da111959ec6 (patch) | |
tree | b4f489dd2f6504639cf4e5e521d184ed06041bb9 /src/interfaces/ecpg/ecpglib/descriptor.c | |
parent | d1b0007639a1cefb5dcecf44999a4461f4c34089 (diff) |
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/descriptor.c')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/descriptor.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/interfaces/ecpg/ecpglib/descriptor.c b/src/interfaces/ecpg/ecpglib/descriptor.c index d5ec3a61203..ef500a915d6 100644 --- a/src/interfaces/ecpg/ecpglib/descriptor.c +++ b/src/interfaces/ecpg/ecpglib/descriptor.c @@ -861,7 +861,6 @@ ECPGdescribe(int line, int compat, bool input, const char *connection_name, cons struct prepared_statement *prep; PGresult *res; va_list args; - const char *real_connection_name = NULL; /* DESCRIBE INPUT is not yet supported */ if (input) @@ -870,21 +869,11 @@ ECPGdescribe(int line, int compat, bool input, const char *connection_name, cons return ret; } - real_connection_name = ecpg_get_con_name_by_declared_name(stmt_name); - 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; - } - - con = ecpg_get_connection(real_connection_name); + con = ecpg_get_connection(connection_name); if (!con) { ecpg_raise(line, ECPG_NO_CONN, ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST, - real_connection_name ? real_connection_name : ecpg_gettext("NULL")); + connection_name ? connection_name : ecpg_gettext("NULL")); return ret; } prep = ecpg_find_prepared_statement(stmt_name, con, NULL); |