pgsql: Fix typos.

2019-05-26 Thread Amit Kapila
Fix typos. Reported-by: Alexander Lakhin Author: Alexander Lakhin Reviewed-by: Amit Kapila and Tom Lane Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9679345f3c5ec071f63db358581e28f06c8

pgsql: Fix thinko in new ECPG "PREPARE AS" code.

2019-05-26 Thread Tom Lane
Fix thinko in new ECPG "PREPARE AS" code. ecpg_register_prepared_stmt() is pretty obviously checking the wrong variable while trying to detect malloc failure. Error in commit a1dc6ab46, spotted by Coverity. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/331695a4d9

pgsql: Fix more thinkos in new ECPG "PREPARE AS" code.

2019-05-26 Thread Tom Lane
Fix more thinkos in new ECPG "PREPARE AS" code. ecpg_build_params() failed to check for ecpg_alloc failure in one newly-added code path, and leaked a temporary string in another path. Errors in commit a1dc6ab46, spotted by Coverity. Branch -- master Details --- https://git.postgresql.org