Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aWNbg-0001ys-S8 for pgsql-jdbc@arkaria.postgresql.org; Thu, 18 Feb 2016 12:22:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aWNbg-0000Oz-D8 for pgsql-jdbc@arkaria.postgresql.org; Thu, 18 Feb 2016 12:22:52 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWNbB-0008Ca-Mn for pgsql-jdbc@postgresql.org; Thu, 18 Feb 2016 12:22:21 +0000 Received: from smtp.procolix.com ([95.215.185.30]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1aWNb9-0004mF-0k for pgsql-jdbc@postgresql.org; Thu, 18 Feb 2016 12:22:20 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp.procolix.com (Postfix) with ESMTP id C35FC43C5C for ; Thu, 18 Feb 2016 13:22:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at smtp.procolix.com Received: from smtp.procolix.com ([127.0.0.1]) by localhost (host436.procolix.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lB0pnJK56DdD for ; Thu, 18 Feb 2016 13:22:15 +0100 (CET) Received: from webmail.procolix.com (webmail.procolix.com [95.215.185.106]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mark@lawinegevaar.nl) by smtp.procolix.com (Postfix) with ESMTPSA id D330443B26 for ; Thu, 18 Feb 2016 13:22:15 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Thu, 18 Feb 2016 13:22:15 +0100 From: Mark Rotteveel To: List Subject: Re: JDBC behaviour In-Reply-To: References: Message-ID: <22d3da56ff9f987ede3d18de6e49423e@imap.procolix.com> X-Sender: mark@lawinegevaar.nl User-Agent: RoundCube Webmail/0.2 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On Thu, 18 Feb 2016 07:15:11 -0500, Dave Cramer wrote: > On 18 February 2016 at 07:09, Mark Rotteveel wrote: > >> On Thu, 18 Feb 2016 11:59:50 +0100 (CET), Andreas Joseph Krogh >> wrote: >> > You simply cannot have batch-inserts in the same transaction and >> expecting >> > the >> > batch not to fail if one of the statements in the batch fails. >> >> On a lot of other database systems, that is exactly how it works. If a >> statement fails, that one statement is backed out (rolled back), and it >> is >> still up to the user to decide if he wants to commit or rollback the >> statements that did succeed. >> > > This behaviour is an artifact of PostgreSQL. If you want to change the > transaction semantics of PostgreSQL then pgsql-hackers is the place to take > this up. > > JDBC is just an interface. We aren't going to rewrite the backend semantics > to meet everyones needs/wants. I understand that and indeed this isn't something that should be handled by the driver, however some of the response in this thread seem to think it is an absurd expectation from the OP that failure of one statement should still allow a commit. Which it isn't if you look at what other database systems do. Mark -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc