Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45678 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72024 invoked from network); 7 Oct 2009 06:06:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2009 06:06:02 -0000 Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 213.92.90.60 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 213.92.90.60 ispeed-srv6.housing.tomato.it Received: from [213.92.90.60] ([213.92.90.60:60010] helo=mail.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/72-58030-9CF2CCA4 for ; Wed, 07 Oct 2009 02:06:02 -0400 Received: (qmail 55168 invoked from network); 7 Oct 2009 08:05:59 +0200 Received: from unknown (HELO ?192.168.1.201?) (matteo@beccati.com@88.149.176.119) by mail.beccati.com with SMTP; 7 Oct 2009 06:05:59 -0000 Message-ID: <4ACC2FAB.50607@beccati.com> Date: Wed, 07 Oct 2009 08:05:31 +0200 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: PHP Internals References: <1254806557.19561.3.camel@samuel-laptop> <1254807735.19561.5.camel@samuel-laptop> <4ACAF18B.5080803@beccati.com> <1254846564.876.1.camel@samuel-laptop> <4ACBC540.4090308@beccati.com> <1254894205.7418.32.camel@samuel-laptop> <4ACC2B8F.2040302@oracle.com> In-Reply-To: <4ACC2B8F.2040302@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PDO PgSQL: _pdo_pgsql_notice From: php@beccati.com (Matteo Beccati) Hi Christopher, > What are notices? Do they relate anything in other Databases? > I.e. can a generic interface be implemented instead of a postgres > specific one? I'm not sure. Notices are non-error messages that can be triggered during a query for informative purposes. For example CREATE TABLE triggers some notices when sequences or indexes are automatically created: test=# create table foo (id serial not null primary key); NOTICE: CREATE TABLE will create implicit sequence "foo_id_seq" for serial column "foo.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo" CREATE TABLE or they can be raised during a function call: test=# CREATE FUNCTION foo() RETURNS void AS $_$DECLARE i int; BEGIN FOR i IN 1..3 LOOP RAISE NOTICE 'i = %', i; END LOOP; END;$_$ LANGUAGE plpgsql; CREATE FUNCTION test=# SELECT foo(); NOTICE: i = 1 NOTICE: i = 2 NOTICE: i = 3 foo ----- (1 row) On PostgreSQL they require a special handler to be set to catch them, but the default behaviour would be to ignore them because they are usually not particularly interesting. Cheers -- Matteo Beccati