X-Original-To: pgsql-interfaces-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 14DFD9FB386 for ; Mon, 21 Aug 2006 20:28:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 11821-08 for ; Mon, 21 Aug 2006 20:28:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id BF0109FB29F for ; Mon, 21 Aug 2006 20:28:39 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.7/8.13.7) with ESMTP id k7LNSFNM028114 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 21 Aug 2006 17:28:17 -0600 (MDT) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.6/8.13.6) with ESMTP id k7LNSE9k039978; Mon, 21 Aug 2006 17:28:14 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.6/8.13.6/Submit) id k7LNSEUu039977; Mon, 21 Aug 2006 17:28:14 -0600 (MDT) (envelope-from mfuhr) Date: Mon, 21 Aug 2006 17:28:14 -0600 From: Michael Fuhr To: osxdeveloper@mac.com Cc: pgsql-interfaces@postgresql.org Subject: Re: Transactions and libpq Message-ID: <20060821232814.GA39874@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.244 tagged_above=0 required=5 tests=AWL, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/23 X-Sequence-Number: 6237 On Tue, Aug 22, 2006 at 01:11:33AM +0200, osxdeveloper@mac.com wrote: > I am writing an application using the libqpsql client lib. Do you mean libpq? Are you coding in C? > What I like to do now, is to control transaction behavior > from within my application. > But the following happens: > When I try to open a transaction libpg prints > "WARNING: there is already a transaction in progress" > to stdout. > The question for me is - why?? As the error says: a transaction had already been started when the application tried to start another one. Can you post a simple but complete program that demonstrates this behavior when you think it shouldn't? You could also enable statement logging on the server to see everything the application is executing. > I searched Google and found some confusing things about serverside > auto-commit - but this is removed at last in Postgres 8.0. Server-side autocommit existed only in 7.3. What version of libpq are you using, and what version of the server? -- Michael Fuhr