Received: from tolikus.hq.aaanet.ru (tolikus.hq.aaanet.ru [195.151.212.227]) by hub.org (8.9.3/8.9.3) with ESMTP id EAA40075 for ; Thu, 2 Sep 1999 04:03:02 -0400 (EDT) (envelope-from tolik@tolikus.hq.aaanet.ru) Received: (from tolik@localhost) by tolikus.hq.aaanet.ru (8.9.3/8.9.3) id LAA15089; Thu, 2 Sep 1999 11:59:12 +0400 (MSD) (envelope-from tolik) To: Martin Neumann Cc: pgsql-sql@postgresql.org Subject: Re: none References: Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII From: tolik@aaanet.ru (Anatoly K. Lasareff) Date: 02 Sep 1999 11:59:11 +0400 In-Reply-To: Martin Neumann's message of "Thu, 2 Sep 1999 08:04:24 +0200 (CEST)" Message-ID: <871zchu4kw.fsf@tolikus.hq.aaanet.ru> Lines: 27 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" >>>>> "MN" == Martin Neumann writes: MN> Every day I get a plain-vanilla ASCII-file containg space-separated MN> values. I parse the file with a script and make each row in the file an MN> INSERT-statement. Sometimes one of these many statements contains MN> rubbish becaused the line in the file I was processing contained MN> rubbish. MN> If I did a separate transaction for every INSERT-statement this doesn't MN> hurt because only one statement (the broken one) doesn't get processed. MN> But I have to do about 100.000 INSERTs everyday and this is _slow_ if I MN> let PostgreSQL process each statement individually. MN> So my idea was to use a chained transaction. This works perfectly as MN> long as all INSERT-statement are okay. But if one is broken, PostgreSQL MN> doesn't process the other statements, too. MN> My goal is to use chained transaction and to don't have to bother MN> about broken INSERT-statements. Is that possible or to do I have to MN> check the statements manually (by the script) before executing? I think your second way is better - check statement in script before executing. -- Anatoly K. Lasareff Email: tolik@icomm.ru