mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 20:36:52 +02:00
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
This commit is contained in:
parent
9d7a80ce01
commit
8ab3452df8
@ -594,7 +594,6 @@ check_declared_list(const char *name)
|
|||||||
continue;
|
continue;
|
||||||
if (strcmp(name, ptr -> name) == 0)
|
if (strcmp(name, ptr -> name) == 0)
|
||||||
{
|
{
|
||||||
if (connection)
|
|
||||||
if (connection && strcmp(ptr->connection, connection) != 0)
|
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);
|
mmerror(PARSE_ERROR, ET_WARNING, "connection %s is overwritten with %s by DECLARE statement %s", connection, ptr->connection, name);
|
||||||
connection = mm_strdup(ptr -> connection);
|
connection = mm_strdup(ptr -> connection);
|
||||||
|
Loading…
Reference in New Issue
Block a user