Transaction Blocks

Started by Matalmost 23 years ago3 messagesgeneral
Jump to latest
#1Mat
psql-mail@freeuk.com

I believe that its more efficient to group INSERT's together and COMMIT
them in groups.
However, I am automatically entering a lot of data and some of its is
not unique. How can I reap the benefits of using BEGIN and COMMIT
without the whole block of transactions failing if one is duplicated.

Thanks!

#2Andrew Sullivan
andrew@libertyrms.info
In reply to: Mat (#1)
Re: Transaction Blocks

On Mon, Jul 07, 2003 at 07:56:44PM +0100, Mat wrote:

not unique. How can I reap the benefits of using BEGIN and COMMIT
without the whole block of transactions failing if one is duplicated.

You can't. You need to be able to retry.

A

-- 
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110
#3Jay O'Connor
joconnor@cybermesa.com
In reply to: Mat (#1)
Re: Transaction Blocks

On 2003.07.07 11:56 Mat wrote:

I believe that its more efficient to group INSERT's together and COMMIT
them in groups.
However, I am automatically entering a lot of data and some of its is
not unique. How can I reap the benefits of using BEGIN and COMMIT
without the whole block of transactions failing if one is duplicated.

Best I could guess would be that you'll need to pre-process the data to
ensure that the data is good.

Take care,
Jay