Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Gurjeet Singh
If you are using psql, I'd recommend using '\set ON_ERROR_ROLLBACK on'.HTH-- [EMAIL PROTECTED][EMAIL PROTECTED] gmail | hotmail | yahoo }.com On 10/22/06, Ron Johnson [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE-Hash: SHA1On 10/22/06 04:39, Jeffrey Webster wrote: On 10/20/06,

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 That doesn't help at all during multi-table transactions or bulk-loads where you want the loader to kick duplicates out to an exception file. On 10/27/06 04:41, Gurjeet Singh wrote: If you are using psql, I'd recommend using '\set ON_ERROR_ROLLBACK

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Gurjeet Singh
On 10/27/06, Ron Johnson [EMAIL PROTECTED] wrote: That doesn't help at all during multi-table transactionsWhat problem do you think you would face in multi-table scenario? I tried the following and it worked for me; hope this is what you meant by multi-table transactions: postgres=# begin;BEGIN

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Ron Johnson
On 10/27/06 05:10, Gurjeet Singh wrote: On 10/27/06, Ron Johnson [EMAIL PROTECTED] wrote: That doesn't help at all during multi-table transactions What problem do you think you would face in multi-table scenario? I tried the following and it worked for me; hope this is what you meant by

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Gurjeet Singh
On 10/27/06, Ron Johnson [EMAIL PROTECTED] wrote: Dueling examples.Attached are two examples of errors.I think you completely missed that I am recommending using '\set ON_ERROR_ROLLBACK on' in psql. Please refer to my previous post and see the effect of the following line:postgres=# \set

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/27/06 06:48, Gurjeet Singh wrote: On 10/27/06, Ron Johnson [EMAIL PROTECTED] wrote: Dueling examples. Attached are two examples of errors. I think you completely missed that I am recommending using '\set ON_ERROR_ROLLBACK on' in psql.

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Alexander Staubo
On Oct 27, 2006, at 14:56 , Ron Johnson wrote: I think you completely missed that I am recommending using '\set ON_ERROR_ROLLBACK on' in psql. Please refer to my previous post and see the effect of the following line: postgres=# \set ON_ERROR_ROLLBACK on But I do *not* want my whole

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/27/06 08:41, Alexander Staubo wrote: On Oct 27, 2006, at 14:56 , Ron Johnson wrote: I think you completely missed that I am recommending using '\set ON_ERROR_ROLLBACK on' in psql. Please refer to my previous post and see the effect of the

Re: [GENERAL] skip duplicate key error during inserts

2006-10-22 Thread Jeffrey Webster
On 10/20/06, Jean-Christophe Roux [EMAIL PROTECTED] wrote: Hello,[snip] none of them will be inserted because the first insert is a primary key violation. How can I have postgreSQL not mind about the error and proceed to the next insert. I could send the inserts one at a time but bundling them

Re: [GENERAL] skip duplicate key error during inserts

2006-10-22 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/22/06 04:39, Jeffrey Webster wrote: On 10/20/06, Jean-Christophe Roux [EMAIL PROTECTED] wrote: Hello, [snip] none of them will be inserted because the first insert is a primary key violation. How can I have postgreSQL not mind about

[GENERAL] skip duplicate key error during inserts

2006-10-20 Thread Jean-Christophe Roux
Hello,I have a table like this:create table dummy (value integer primary key);and I insert a row like thisinsert into dummy values(0);then I want to insert three rows:insert into dummy values(0);insert into dummy values(1);insert into dummy values(2);none of them will be inserted because the first

Re: [GENERAL] skip duplicate key error during inserts

2006-10-20 Thread Merlin Moncure
On 10/20/06, Jean-Christophe Roux [EMAIL PROTECTED] wrote: Hello, I have a table like this: create table dummy (value integer primary key); and I insert a row like this insert into dummy values(0); then I want to insert three rows: insert into dummy values(0); insert into dummy values(1); insert