Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id EEAF6B5DC15 for ; Tue, 20 Sep 2011 06:36:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 62676-10 for ; Tue, 20 Sep 2011 09:36:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail.softperience.eu (static-ip-217-118-26-141.inaddr.ip-pool.com [217.118.26.141]) by mail.postgresql.org (Postfix) with ESMTP id ADBF7B5DC13 for ; Tue, 20 Sep 2011 06:36:06 -0300 (ADT) Received: from mail.softperience.eu (static-ip-217-118-26-141.inaddr.ip-pool.com [217.118.26.141]) by mail.softperience.eu (Postfix) with ESMTPA id C0B1CC000B1; Tue, 20 Sep 2011 11:36:01 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Tue, 20 Sep 2011 11:36:01 +0200 From: =?UTF-8?Q?Rados=C5=82aw_Smogura?= To: Kevin Grittner Cc: Jean-Max Reymond , Subject: Re: behavior at the end of a transaction In-Reply-To: <4E7760FB02000025000413A1@gw.wicourts.gov> References: <4E7760FB02000025000413A1@gw.wicourts.gov> Message-ID: X-Sender: rsmogura@softperience.eu User-Agent: Roundcube Webmail/0.5.4 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201109/73 X-Sequence-Number: 22191 On Mon, 19 Sep 2011 15:34:19 -0500, Kevin Grittner wrote: > Jean-Max Reymond wrote: > >> On commit or rollback statement, I expect that all the cursors >> are closed (all my Resultset not closed) in the postgres database. >> is it correct ? > > No. > > http://www.postgresql.org/docs/9.1/interactive/sql-declare.html > > In particular, see the WITH/WITHOUT HOLD section. > > -Kevin Don't worry, If you "forget" result sets, when those will be GCed then cursors will be closed soon, too. Regards, Radosław Smogura