Re: none - Mailing list pgsql-sql

From tolik@aaanet.ru (Anatoly K. Lasareff)
Subject Re: none
Date
Msg-id 871zchu4kw.fsf@tolikus.hq.aaanet.ru
Whole thread Raw
In response to ...  (Martin Neumann <lists@mne.de>)
List pgsql-sql
>>>>> "MN" == Martin Neumann <lists@mne.de> writes:
MN> Every day I get a plain-vanilla ASCII-file containg space-separatedMN> values. I parse the file with a script and
makeeach row in the file anMN> INSERT-statement. Sometimes one of these many statements containsMN> rubbish becaused
theline in the file I was processing containedMN> rubbish.
 
MN> If I did a separate transaction for every INSERT-statement this doesn'tMN> hurt because only one statement (the
brokenone) doesn't get processed.
 
MN> But I have to do about 100.000 INSERTs everyday and this is _slow_ if IMN> let PostgreSQL process each statement
individually.
MN> So my idea was to use a chained transaction. This works perfectly asMN> long as all INSERT-statement are okay. But
ifone is broken, PostgreSQLMN> doesn't process the other statements, too.
 
MN> My goal is to use chained transaction and to don't have to botherMN> about broken INSERT-statements. Is that
possibleor to do I have toMN> 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 


pgsql-sql by date:

Previous
From: Zalman Stern
Date:
Subject: Re: your mail
Next
From: elca@cais.kaist.ac.kr
Date:
Subject: =?EUC-KR?B?uri9w7jp?= =?EUC-KR?B?wM67/cDM?= =?EUC-KR?B?tN6288H6wfa1tQ==?= =?EUC-KR?B?uPC4p7TPtNk=?=.. :-))