Re: How to insert on duplicate key? - Mailing list pgsql-general

From Michael Glaesemann
Subject Re: How to insert on duplicate key?
Date
Msg-id 41276A54-80FC-4864-8A5F-77AF2554D6AB@seespotcode.net
Whole thread Raw
In response to How to insert on duplicate key?  ("fdu.xiaojf@gmail.com" <fdu.xiaojf@gmail.com>)
Responses Re: How to insert on duplicate key?
List pgsql-general
On Dec 24, 2007, at 22:03 , fdu.xiaojf@gmail.com wrote:

> I have googled and currently the only way I can find is do query
> first and then update or insert.

Or alternatively, UPDATE and see if you've affected any rows. If not,
insert.

Michael Glaesemann
grzm seespotcode net



pgsql-general by date:

Previous
From: "fdu.xiaojf@gmail.com"
Date:
Subject: How to insert on duplicate key?
Next
From: "fdu.xiaojf@gmail.com"
Date:
Subject: Re: How to insert on duplicate key?