Skip site navigation (1) Skip section navigation (2)

Re: Conditional INSERT: if not exists

From: "Don Morrison" <donmorrison(at)gmail(dot)com>
To: "Sean Davis" <sdavis2(at)mail(dot)nih(dot)gov>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Conditional INSERT: if not exists
Date: 2006-08-23 21:45:10
Message-ID: aee6519f0608231445h4e623a2xda2ecf1f48a6cfe6@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
> isn't a problem.  If you need to do this in a transaction, you can
> simply set savepoints and roll back to the savepoint if an insert fails
> (and you expected that it could).

Unfortunately, for some reason it does a rollback of the entire outer
transaction too, not just the nested one. :(  Anybody know why?

If I use stored procedures will it be easier?

In response to

Responses

pgsql-novice by date

Next:From: Don MorrisonDate: 2006-08-23 22:25:25
Subject: Re: Conditional INSERT: if not exists
Previous:From: Don MorrisonDate: 2006-08-23 21:18:23
Subject: Re: Conditional INSERT: if not exists

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group