pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tolik@aaanet.ru
To: Martin Neumann <lists@mne.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: none
Date: 02 Sep 1999 11:59:11 +0400
Message-ID: <871zchu4kw.fsf@tolikus.hq.aaanet.ru> (raw)
References: <m11MPyy-000DMVC@darwin.oche.de>

>>>>> "MN" == Martin Neumann <lists@mne.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@icomm.ru 



view thread (3+ messages)  latest in thread

Message-ID: <871zchu4kw.fsf@tolikus.hq.aaanet.ru>
Permalink:  ../871zchu4kw.fsf@tolikus.hq.aaanet.ru/
Also on:    postgresql.org/message-id/871zchu4kw.fsf@tolikus.hq.aaanet.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tolik@aaanet.ru, lists@mne.de
  Subject: Re: none
  In-Reply-To: <871zchu4kw.fsf@tolikus.hq.aaanet.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox