From: Martin Neumann <lists(at)mne(dot)de>
To: pgsql-sql(at)postgreSQL(dot)org
Subject:
Date: 1999-09-02 06:04:24
Message-ID: m11MPyy-000DMVC@darwin.oche.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Every day I get a plain-vanilla ASCII-file containg space-separated
values. I parse the file with a script and make each row in the file an
INSERT-statement. Sometimes one of these many statements contains
rubbish becaused the line in the file I was processing contained
rubbish.

If I did a separate transaction for every INSERT-statement this doesn't
hurt because only one statement (the broken one) doesn't get processed.

But I have to do about 100.000 INSERTs everyday and this is _slow_ if I
let PostgreSQL process each statement individually.

So my idea was to use a chained transaction. This works perfectly as
long as all INSERT-statement are okay. But if one is broken, PostgreSQL
doesn't process the other statements, too.

My goal is to use chained transaction and to don't have to bother
about broken INSERT-statements. Is that possible or to do I have to
check the statements manually (by the script) before executing?

--
`Unser Kopf ist rund, damit das Denken die Richtung wechseln kann.'
~ Francis Picabia

Responses

  • Re: your mail at 1999-09-02 06:44:40 from Zalman Stern
  • Re: none at 1999-09-02 07:59:11 from Anatoly K. Lasareff
  • Re: at 1999-09-02 09:59:47 from Clayton Cottingham

Browse pgsql-sql by date

  From Date Subject
Next Message Zalman Stern 1999-09-02 06:44:40 Re: your mail
Previous Message Bruce Momjian 1999-09-01 23:23:28 Re: [SQL] entries in pg_shadow