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

Re: Conditional INSERT: if not exists

From: "Don Morrison" <donmorrison(at)gmail(dot)com>
To: "Bruno Wolff III" <bruno(at)wolff(dot)to>, "Don Morrison" <donmorrison(at)gmail(dot)com>, "Franck Routier" <franck(dot)routier(at)axege(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Conditional INSERT: if not exists
Date: 2006-08-23 21:05:55
Message-ID: aee6519f0608231405u13b16147v3ae2cdb5a158e102@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
> If you know there won't be concurrent inserts or deletes affecting the
> row of interest there is a way to do this in the INSERT statement.

I cannot rule out concurrent inserts.

> > transaction...I'm not sure the nested transaction is necessary...maybe
> > just the savepoint. Example:
> Using save points creates nested transactions, so you have that overhead by
> whatever name it is called.

Overhead yes, that was not the question.  The question was is the
extra nesting necessary?

In response to

Responses

pgsql-novice by date

Next:From: Sean DavisDate: 2006-08-23 21:10:56
Subject: Re: Conditional INSERT: if not exists
Previous:From: Bruno Wolff IIIDate: 2006-08-23 20:57:44
Subject: Re: Conditional INSERT: if not exists

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