[Fix][Engine] fix pg execute custom sql error (#587)