Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 8E5466334EE for ; Fri, 29 Jan 2010 13:01:59 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 88529-03 for ; Fri, 29 Jan 2010 17:01:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mail.postgresql.org (Postfix) with ESMTP id B7127633711 for ; Fri, 29 Jan 2010 13:01:48 -0400 (AST) Received: by bwz5 with SMTP id 5so1601658bwz.3 for ; Fri, 29 Jan 2010 09:01:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.139.23 with SMTP id c23mr753668bku.112.1264784507205; Fri, 29 Jan 2010 09:01:47 -0800 (PST) In-Reply-To: <3073cc9b1001290805w3d93cbcl906aabb8fe739a9d@mail.gmail.com> References: <3073cc9b1001290805w3d93cbcl906aabb8fe739a9d@mail.gmail.com> From: Jaime Casanova Date: Fri, 29 Jan 2010 12:01:32 -0500 Message-ID: <3073cc9b1001290901q3c5b3043j6036a08d7ea757c5@mail.gmail.com> Subject: Re: capturing errors To: pgsql-php@postgresql.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.53 tagged_above=-10 required=5 tests=AWL=-0.531, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201001/18 X-Sequence-Number: 4116 On Fri, Jan 29, 2010 at 11:06 AM, Jaime Casanova wrote: > > i'm using pg_result_error_field() but when i print it i get nothing, > is there something i have to configure or what i'm doing bad. > attached a little php script for testing and here is the schema the > script is using (obviously the error i'm trying to catch here is > unique violation) seems like i have to use pg_send_query() for the pg_result_error_field() function to be used, but the problem is that this is asynchronous could be a problem if i use transactions? --=20 Atentamente, Jaime Casanova Soporte y capacitaci=C3=B3n de PostgreSQL Asesor=C3=ADa y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157