summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2021-08-25 06:16:31 +0000
committerMichael Paquier2021-08-25 06:16:31 +0000
commit1387925a488eb002b59f3b7f58855a4b711b6415 (patch)
tree969913d75a9a8ead4d423fb9fe1039685bafa2a6
parent29b5905470285bf730f6fe7cc5ddb3513d0e6945 (diff)
Fix incorrect merge in ECPG code with DECLARE
The same condition was repeated twice when comparing the connection used by existing declared statement with the one coming from a fresh DECLARE statement. This had no consequences, but let's keep the code clean. Oversight in f576de1. Author: Shenhao Wang Discussion: https://postgr.es/m/OSBPR01MB42149653BC0AB0A49D23C1B8F2C69@OSBPR01MB4214.jpnprd01.prod.outlook.com Backpatch-through: 14
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.header1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header
index df58f1535c..b8508a9123 100644
--- a/src/interfaces/ecpg/preproc/ecpg.header
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -594,7 +594,6 @@ check_declared_list(const char *name)
continue;
if (strcmp(name, ptr -> name) == 0)
{
- if (connection)
if (connection && strcmp(ptr->connection, connection) != 0)
mmerror(PARSE_ERROR, ET_WARNING, "connection %s is overwritten with %s by DECLARE statement %s", connection, ptr->connection, name);
connection = mm_strdup(ptr -> connection);