Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22605 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55514 invoked by uid 1010); 28 Mar 2006 09:15:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55482 invoked from network); 28 Mar 2006 09:15:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Mar 2006 09:15:39 -0000 X-Host-Fingerprint: 212.112.227.169 ipx11223.ipxserver.de Linux 2.5 (sometimes 2.4) (4) Received: from ([212.112.227.169:58756] helo=ipx11223.ipxserver.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 67/0C-37235-BBEF8244 for ; Tue, 28 Mar 2006 04:15:39 -0500 Received: from localhost (localhost [127.0.0.1]) by ipx11223.ipxserver.de (Postfix) with ESMTP id D1DFADF00C5; Tue, 28 Mar 2006 11:15:30 +0200 (CEST) Received: from ipx11223.ipxserver.de ([127.0.0.1]) by localhost (ipx11223 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08207-04; Tue, 28 Mar 2006 11:15:12 +0200 (CEST) Received: from [127.0.0.1] (i577B4C2D.versanet.de [87.123.76.45]) by ipx11223.ipxserver.de (Postfix) with ESMTP id F00E6DF00C4; Tue, 28 Mar 2006 11:15:11 +0200 (CEST) Message-ID: <4428FE9A.1020907@php.net> Date: Tue, 28 Mar 2006 11:15:06 +0200 User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Yasuo Ohgaki Cc: Wez Furlong , internals@lists.php.net References: <4425040E.60402@ohgaki.net> <44250532.7070509@php.net> <44275330.7050508@ohgaki.net> <44279BCB.1090105@php.net> <44280F96.3090600@ohgaki.net> <44281210.3000103@php.net> <442816CF.6040305@ohgaki.net> <4e89b4260603271311m50dcbdbbw8b29b0ddf712baf6@mail.gmail.com> <44288282.3070009@ohgaki.net> In-Reply-To: <44288282.3070009@ohgaki.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by somedaemon at backendmedia.com Subject: Re: [PHP-DEV] Re: pg_execute error From: lsmith@php.net (Lukas Smith) 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