how does one replace a row in Postgresql? (ala MySQL REPLACE) - Mailing list pgsql-sql

From Terrence Brannon
Subject how does one replace a row in Postgresql? (ala MySQL REPLACE)
Date
Msg-id B9A8DB2D-EE83-11D5-9845-003065C2A10C@mac.com
Whole thread Raw
In response to Re: Can anybody help me with SQL?  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: how does one replace a row in Postgresql? (ala MySQL REPLACE)
Re: how does one replace a row in Postgresql? (ala MySQL REPLACE)
Numbering Rows (SEQUENCE, OID) questions
List pgsql-sql
A common task is to check to see if a row with a certain primary 
key exists before inserting it. If the row exists, then you 
simply update/overwrite its contents with the new row data. 
Otherwise you insert it.

MySQL has a REPLACE command which does this.

I didn't see one in the Postgresql manual. How do you do this in 
Postgresql?



pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Indices
Next
From: Philip Hallstrom
Date:
Subject: Re: how does one replace a row in Postgresql? (ala MySQL REPLACE)