Re: MERGE Specification

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: MERGE Specification
Дата
Msg-id 4811D7DD.9070100@dunslane.net
обсуждение исходный текст
Ответ на Re: MERGE Specification  (Robert Treat <xzilla@users.sourceforge.net>)
Список pgsql-hackers

Robert Treat wrote:
>
> Perhaps a better option would be to implement Merge per spec, and then 
> implement a "replace into" command for the oltp scenario.  This way you keep 
> the spec behavior for the spec syntax, and have a clearly non-spec command 
> for non-spec behavior. 
>   

MySQL's "REPLACE INTO" is *NOT* semantically equivalent to any flavor of 
"insert or update". It is "delete plus insert". They do have "INSERT ... 
ON DUPLICATE KEY UPDATE ..."


Presumably, if we implement MERGE with transaction-safe semantics, which 
Simon has agreed to do, we would not need to consider anything like the 
latter, but we might still want to consider REPLACE INTO (in the MySQL 
sense).

cheers

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Aidan Van Dyk
Дата:
Сообщение: Re: Proposed patch - psql wraps at window width
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: MERGE Specification