X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3E9134758FE for ; Tue, 25 Feb 2003 13:44:55 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 58875-06 for ; Tue, 25 Feb 2003 13:44:44 -0500 (EST) Received: from localhost.localdomain (167.95.252.64.snet.net [64.252.95.167]) by postgresql.org (Postfix) with ESMTP id CA165475458 for ; Tue, 25 Feb 2003 13:41:13 -0500 (EST) Received: (from wweng@localhost) by localhost.localdomain (8.11.6/8.11.6) id h1PIfsK23397 for pgsql-interfaces@postgresql.org; Tue, 25 Feb 2003 13:41:54 -0500 X-Authentication-Warning: localhost.localdomain: wweng set sender to wweng@kencast.com using -f Date: Tue, 25 Feb 2003 13:41:54 -0500 From: Wei Weng To: pgsql-interfaces@postgresql.org Subject: debug a mess Message-ID: <20030225134154.A23392@example.com> Reply-To: Wei Weng Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/103 X-Sequence-Number: 3724 I am trying to figure out where the "NOTICE: current transaction is aborted, queries ignored until end of transaction block" comes from in my code. Basically, this is what it does: CString strQuery = "SELECT datname FROM pg_database WHERE name = 'mydatabase'"; if (NULL == (res = PQexec(pgconn, (CSTR) strQuery))) { ErrorQuit(PQerrorMessage(pgconn)); } It is really very simple code, but each time I try to run it, the postgresql backend gives me the "transaction aborted" error message. I checked the mailing list archive, and Tom once explained that the reason for this error message is the backend had quitted for some reason. Is there anyway to see why the backend aborted the transaction?? It could be really helpful. Thanks Wei