MySql 'REPLACE' - Mailing list pgsql-sql

From Alessio Bragadini
Subject MySql 'REPLACE'
Date
Msg-id 3AE6C553.74036D93@albourne.com
Whole thread Raw
Responses Re: MySql 'REPLACE'
Re: MySql 'REPLACE'
List pgsql-sql
I am working in porting the Slash software from MySql to PostgreSQL. I
stepped in MySql's REPLACE command (a SQL command) that to my knowledge
is not supported by PostgreSQL and it's not standard SQL. According to
MySql's manual:

"REPLACE works exactly like INSERT, except that if an old record in the
table has the same value as a new record on a unique index, the old
record is
deleted before the new record is inserted. See section 7.21 INSERT
syntax."

REPLACE INTO table (column, column...) VALUES (value, value...)

Has anyone had any experience about how to simulate it under PostgreSQL?
I am using Perl and I can move most of the thing into application
anyway.

Thanks.

-- 
Alessio F. Bragadini        alessio@albourne.com
APL Financial Services        http://village.albourne.com
Nicosia, Cyprus             phone: +357-2-755750

"It is more complicated than you think"    -- The Eighth Networking Truth from RFC 1925


pgsql-sql by date:

Previous
From: Antti Linno
Date:
Subject: Re: RE:Table corrupted and data lost (second time in one month!!)
Next
From: Thomas Good
Date:
Subject: Re: MySql 'REPLACE'