Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 748C46359D6 for ; Mon, 3 Aug 2009 15:39:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 59615-04 for ; Mon, 3 Aug 2009 18:39:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from anni.mesolt.eu (anni.mesolt.eu [78.46.68.173]) by mail.postgresql.org (Postfix) with ESMTP id DDA79635C50 for ; Mon, 3 Aug 2009 15:37:36 -0300 (ADT) Received: from [192.168.2.127] (p4FCE5AD6.dip.t-dialin.net [79.206.90.214]) by anni.mesolt.eu (Postfix) with ESMTP id 5FBE92AFCBCC for ; Mon, 3 Aug 2009 20:49:58 +0200 (CEST) Message-ID: <4A772E6F.1000108@gmx.de> Date: Mon, 03 Aug 2009 20:37:35 +0200 From: Andreas Kalsch User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: PDO does not trow Exceptions for queries Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/1 X-Sequence-Number: 4042 $C->DB is my connection, but no exceptions will be thrown for the last queries - althogh there is an error (whoch the command line would show). Is there another option to activate throwing of exceptions? $C->DB->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $C->DB->query('DROP TABLE key'); $C->DB->query('CREATE TABLE key ( id SERIAL NOT NULL PRIMARY KEY, k TEXT NOT NULL UNIQUE )'); $S = $C->DB->prepare('INSERT INTO key (k) SELECT lower(k) FROM current_node_tags LIMIT 100'); What my phpinfo() says: PHP Version 5.2.6-1+lenny3 This server is protected with the Suhosin Patch 0.9.6.2 PDO PDO support enabled PDO drivers pgsql pdo_pgsql PDO Driver for PostgreSQL enabled PostgreSQL(libpq) Version 8.3.7 Module version 1.0.2 Revision $Id: pdo_pgsql.c,v 1.7.2.11 2006/03/14 10:49:18 edink Exp $ pgsql PostgreSQL Support enabled PostgreSQL(libpq) Version 8.3.7 Multibyte character support enabled SSL support enabled Active Persistent Links 0 Active Links 0 pgsql.allow_persistent On On pgsql.auto_reset_persistent Off Off pgsql.ignore_notice Off Off pgsql.log_notice Off Off pgsql.max_links Unlimited Unlimited pgsql.max_persistent Unlimited Unlimited