Re: none
От | tolik@aaanet.ru (Anatoly K. Lasareff) |
---|---|
Тема | Re: none |
Дата | |
Msg-id | 871zchu4kw.fsf@tolikus.hq.aaanet.ru обсуждение исходный текст |
Ответ на | ... (Martin Neumann <lists@mne.de>) |
Список | 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 по дате отправления: