RE: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE - Mailing list pgsql-hackers

From wangsh.fnst@fujitsu.com
Subject RE: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE
Date
Msg-id OSBPR01MB42149653BC0AB0A49D23C1B8F2C69@OSBPR01MB4214.jpnprd01.prod.outlook.com
Whole thread Raw
In response to RE: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE  ("kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>)
Responses Re: ECPG bug fix: DECALRE STATEMENT and DEALLOCATE, DESCRIBE
List pgsql-hackers
Hi,

I find in ecpg.header, the source:
>            if (connection)
>            if (connection && strcmp(ptr->connection, connection) != 0)

The first if statement is useless. And in fix-ecpg-tests.patch:
>-            if (connection)
>-                mmerror(PARSE_ERROR, ET_WARNING, "connection %s is overwritten to %s.", connection, ptr->connection);
>+            if (connection && strcmp(ptr->connection, connection) != 0)
>+                mmerror(PARSE_ERROR, ET_WARNING, "declare statement %s using connection %s overwritten to connection
%s.",
>+                    name, connection, ptr->connection);
The patch seems right.

Delete first if statement, patch attached.

Regards,
Shenhao Wang

Attachment

pgsql-hackers by date:

Previous
From: Soumyadeep Chakraborty
Date:
Subject: Re: Unnecessary delay in streaming replication due to replay lag
Next
From: Noah Misch
Date:
Subject: Re: replay of CREATE TABLESPACE eats data at wal_level=minimal