Re: Re: pg_execute error

From: Date: Tue, 28 Mar 2006 09:15:06 +0000
Subject: Re: Re: pg_execute error
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-22605@lists.php.net to get a copy of this message
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

« previous php.internals (#22605) next »