Yasuo Ohgaki wrote:
Wez Furlong wrote:
Regardless of whether it's a good idea or not, you should not just go
ahead and commit such a big behaviour change to the stable branch
during the release process.

Please revert your commit.

That's good point.
Any people should not depend on pg_execute's E_WARNING error
in transaction, but I'll revert patch against PHP_5_1.

Sorry but your comparison to file_exists() is wrong. pg_execute() compares to something like include() if at all. Again I do want something like pg_is_prepared() but I rather wait until pgsql 8.2 where we get a proper native solution.

For your case you should simply do:

// this will trigger an error if the query plan is already prepared
// but we can ignore the error
@pg_prepare($dbconn, 'myplan', $sql);
for ($i = 0; $i < 10000; $i++) {
  pg_execute($dbconn, 'myplan', $values);
}

along with the necessary changes to your error handler you are all set. you only have a single error silenced call.

so this change should be reverted in all branches ..

regards,
Lukas

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to