Hi,
Currently in src/interfaces/ecpg/ecpglib/prepare.c we don't check thereturn value of replace_variables(). The proposed patch fixes this.The rest of the code looks OK to me.
-- Best regards,Aleksander Alekseev