Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: MERGE Specification


  • From: Andrew Dunstan <andrew(at)dunslane(dot)net>
  • To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
  • Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Decibel!" <decibel(at)decibel(dot)org>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Gregory Stark <stark(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, "A.M." <agentm(at)themactionfaction(dot)com>
  • Subject: Re: MERGE Specification
  • Date: Fri, 25 Apr 2008 09:08:45 -0400
  • Message-id: <4811D7DD(dot)9070100(at)dunslane(dot)net>



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group