Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aXADU-0002cw-ER for pgsql-jdbc@arkaria.postgresql.org; Sat, 20 Feb 2016 16:17:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aXADT-0000cx-QS for pgsql-jdbc@arkaria.postgresql.org; Sat, 20 Feb 2016 16:17:07 +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 1aXACy-0008WH-RY for pgsql-jdbc@postgresql.org; Sat, 20 Feb 2016 16:16:36 +0000 Received: from virtual1.potentialtech.com ([69.25.178.43] helo=mail.potentialtech.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aXACr-0002Im-57 for pgsql-jdbc@postgresql.org; Sat, 20 Feb 2016 16:16:35 +0000 Received: from working.home (c-67-171-70-156.hsd1.pa.comcast.net [67.171.70.156]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTPSA id 931DE24BEE0; Sat, 20 Feb 2016 11:16:27 -0500 (EST) Date: Sat, 20 Feb 2016 11:16:25 -0500 From: Bill Moran To: Vitalii Tymchyshyn Cc: "David G. Johnston" , Craig Ringer , John R Pierce , "pgsql-jdbc@postgresql.org" Subject: Re: JDBC behaviour Message-Id: <20160220111625.4ee764661333e42e230348ad@potentialtech.com> In-Reply-To: References: <954cc530fdaf2c5cf63dcb180d05fb56@imap.procolix.com> <4C508581-9CA3-490D-A376-CC1F9FF5D258@me.com> <56C8487F.7020406@hogranch.com> X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.25; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Sat, 20 Feb 2016 16:01:04 +0000 Vitalii Tymchyshyn wrote: > Well, it OT here and belongs to -hackers, but as for me main use case here > is ETL or ELT process getting a lot of unvalidated external data. > And a good option to solve this problem is not to change transaction > semantics or slow down processing by adding tons of savepoints, but add "on > error" clause to insert/copy statement. > > This clause should allow to save records that can't fit into destination > table because of type, check of referential constaints into error table. > Oracle has similar functionality and we are using it in our project. No > error is generated - no transaction rollback, batch abort or similar. > > As for me it would cover 90% of use cases and would be really usefull. The > one problem I can see is with inserting into partition parent. PL/PGSQL provides this functionality. It requires the creation of a server side function and using that function to insert data, but it can do exactly what you're describing. While adding other mechanisms to make it "easier" or "more like some other software" might be valuable; the simple fact is that Postgres _does_ support what you want. The fact that you're not aware of it doesn't change that. -- Bill Moran -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc