Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TFTb9-0003Lg-A7 for pgsql-sql@postgresql.org; Sat, 22 Sep 2012 17:34:35 +0000 Received: from eastrmfepo102.cox.net ([68.230.241.214]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TFTb6-00007q-V1 for pgsql-sql@postgresql.org; Sat, 22 Sep 2012 17:34:34 +0000 Received: from eastrmimpo110 ([68.230.241.223]) by eastrmfepo102.cox.net (InterMail vM.8.01.04.00 201-2260-137-20101110) with ESMTP id <20120922173432.VULH26743.eastrmfepo102.cox.net@eastrmimpo110> for ; Sat, 22 Sep 2012 13:34:32 -0400 Received: from slacker.ja10629.home ([68.106.109.147]) by eastrmimpo110 with cox id 2HaX1k00G3Ar1Vg01HaXGt; Sat, 22 Sep 2012 13:34:31 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020202.505DF6A7.008A,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=2.0 cv=N5Wr5hBB c=1 sm=1 a=sXZhTwfwSKhiTs9RzZXpNQ==:17 a=z1TLwsU0kBEA:10 a=PjkiJtDTOQ4A:10 a=ZcFhQy0-F_sA:10 a=kj9zAlcOel0A:10 a=P6M1L9rJAAAA:8 a=cPdjwjurw9YA:10 a=oN_5t9b_ngkkEbWDTJkA:9 a=CjuIK1q_8ugA:10 a=sXZhTwfwSKhiTs9RzZXpNQ==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none Received: from wcuddy by slacker.ja10629.home with local (Exim 4.72) (envelope-from ) id 1TFTb5-00049a-9X for pgsql-sql@postgresql.org; Sat, 22 Sep 2012 13:34:31 -0400 Date: Sat, 22 Sep 2012 13:34:31 -0400 From: Wayne Cuddy To: PostgreSQL Subject: transactions and ecpg Message-ID: <20120922173431.GF15197@slacker.ja10629.home> Mail-Followup-To: PostgreSQL Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Pg-Spam-Score: -0.0 (/) X-Archive-Number: 201209/52 X-Sequence-Number: 36854 I'm looking at some code that a coworker ported from Informix to Postgres 9.0. The Informix database did not have transaction logging enabled thus no begins/aborts/commits/rollbacks where in the original code. The way the code has been ported there are still no begin statements in the code, only commit and rollback after data changing statements are executed. Question 1: After a commit/rollback does the next SQL statement implicitly begin a transaction? Question 2: If we're just examining data via SELECT statements should we be issuing COMMIT statements after or are they only required for data modifying operations? Thanks in advance, Wayne