Search Postgresql Archives

Re: insert/update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Tom Allison <tallison@tacocat.net> wrote:
> Jeff Eckermann wrote:
> > --- Tom Allison <tallison@tacocat.net> wrote:
> > 
> >>I seemed to remember being able to do this but I
> >>can't find the docs.
> >>
> >>Can I run a sql query to insert new or update
> >>existing rows in one query?
> 
> So I have to watch out for transactions on this?
> Essentially what I'm trying to do is one of the
> following two:
> 
> if exists update a field to field+1 on one record
> if it doesn't exist, insert a row with field = 1
> 

I'm not sure what you are asking here that is not
already covered.  I suggest you spend some time
reading the documentation on concurrency, and
searching the archives for some of the lengthy past
discussions on this topic.


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux