From: | tolik(at)aaanet(dot)ru (Anatoly K(dot) Lasareff) |
---|---|
To: | Martin Neumann <lists(at)mne(dot)de> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: none |
Date: | 1999-09-02 07:59:11 |
Message-ID: | 871zchu4kw.fsf@tolikus.hq.aaanet.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
>>>>> "MN" == Martin Neumann <lists(at)mne(dot)de> 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(at)icomm(dot)ru
From | Date | Subject | |
---|---|---|---|
Next Message | elca | 1999-09-02 08:07:15 | 보시면인생이달라질지도 =?EUC-KR?B?uPC4p7TPtNk=?=.. :-)) |
Previous Message | Zalman Stern | 1999-09-02 06:44:40 | Re: your mail |