I see your point - I am using MySQL and didn't think about the other DB's.

Looking more closely at the postgresql and sqlite docs, plus the fact that REPLACE is not standard SQL at all, I see that it will be quite a job to implement a more flexible Replace expression that supports all the different DB's in their own peculiar ways:

* postgresql: does not even have any sort of REPLACE at all (AFAICT)
* sqlite: REPLACE works like its INSERT: "The REPLACE command is an alias for the "INSERT OR REPLACE" variant of the INSERT command. This alias is provided for compatibility with MySQL.".

So if I wanted to improve the sqlbuilder Replace, I guess it would be best to have a totally new Replace expression (not inheriting from Insert or Update), and then have lots of these:
    if db == "..."

Would this be the way to go?

- Frank

Oleg Broytmann wrote:
On Tue, Dec 04, 2007 at 02:29:10PM -0800, Frank Conradie wrote:
I don't want to fight with you, but INSERT also supports SET:

   No, it doesn't (meaning "standard" SQL).

http://www.postgresql.org/docs/7.3/static/sql-insert.html :

INSERT INTO table [ ( column [, ...] ) ]
     { DEFAULT VALUES | VALUES ( { expression | DEFAULT } [, ...]) | SELECT query }

http://sqlite.org/lang_insert.html :

INSERT [OR conflict-algorithm] INTO [database-name .]  table-name
     [(column-list)] VALUES (value-list)

   SQLObject produces that (more or less) standard INSERT, not MySQL

PS. But if you want to teach SQLObject to generate MySQLish INSERT - you
know where to send patches.