Re: INSERT ON DUPLICATE KEY UPDATE

Поиск
Список
Период
Сортировка
От Eduardo Pérez Ureta
Тема Re: INSERT ON DUPLICATE KEY UPDATE
Дата
Msg-id 20040618204630.GA28564@localhost.localdomain
обсуждение исходный текст
Ответ на Re: INSERT ON DUPLICATE KEY UPDATE  (Robert Treat <xzilla@users.sourceforge.net>)
Ответы Re: INSERT ON DUPLICATE KEY UPDATE  (Robert Treat <xzilla@users.sourceforge.net>)
Список pgsql-general
On 2004-06-18 20:15:11 UTC, Robert Treat wrote:
> IIRC the standard syntax is based on db2's horrendous merge on command,
> which was only added to the standard a couple months back.

Great! I didn't know that was standard.
I see that Oracle has it:
http://www.dba-oracle.com/oracle_tips_rittman_merge.htm
And db2 as you said:
http://www.databasejournal.com/features/db2/article.php/3322041

Could you explain why db2's merge command is horrendous?
Is it better the mysql command?

So will postgresql accept this command?

> IIRC the main downside to the select/update method is it introduces a
> race condition that can only be solved by locking the table; not an
> issue for most my$ql apps but would be frowned upon by most postgresql
> users.

Or course, if you don't need to do locking is a plus.

Eduardo

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

Предыдущее
От: jseymour@linxnet.com (Jim Seymour)
Дата:
Сообщение: Re: INSERT ON DUPLICATE KEY UPDATE
Следующее
От: "Jeroen T. Vermeulen"
Дата:
Сообщение: Article on open-source databases