ext-postgresql
ext-postgresql copied to clipboard
Prepared Statement Bug
Hello, errors in a prepared statement doesn't get reported, example:
$stmt = $db->prepare("my_query, "SELECT * from non_existing_table");
Here, non_existing_table doesnt exists, but $stmt returns true
and also :
$db->error is null
@sy-records I can confirm this is a bug, prepare is always returning true even if it fails. https://github.com/swoole/ext-postgresql/blob/v4.4.x/swoole_postgresql_coro.cc#L620
I fixed it in this PR - https://github.com/swoole/ext-postgresql/pull/19 (https://github.com/swoole/ext-postgresql/pull/19/files#diff-f6c52869d82feeba7cef8b1ab64732daR652)
Thanks for your contribution, please wait for review. @codercms
@razzbee #19 is merged into v4.4.x
branch. Can you confirm that your issue is resolved?
I will provide a feedback after testing, Thanks