Ignoring an SQL INSERT error

From: Shawn Chisholm <ShawnC(at)sandvine(dot)com>
To: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Ignoring an SQL INSERT error
Date: 2004-06-07 17:54:37
Message-ID: FE045D4D9F7AED4CBFF1B3B813C8533702C76E87@mail.sandvine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Hi,

Does anyone know of a way to perform an insert that does not abort the
transaction if it fails?

I am trying to implement a rule that will allow the insertion data into a
view (for backward compatability) by performing inserts in other tables, and
there are situations where an insert into one of the underlying tables is
unnecessary and causes a unique key constraint violation. Ideally I would
like to do an insert and ignore any errors...

Thanks,

Shawn

PS. I am using PostgreSql 7.4

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Scott Marlowe 2004-06-07 19:57:16 Re: Shut down postgres server...
Previous Message celoftis 2004-06-07 00:58:16 Shut down postgres server...