Conversation
|
Hi @dylanwh, I'm not clear exactly the purpose here. Per the MySQL docs, this is just an alternative way to doing what's in #84 for MySQL, and still leaves out Postgres. Per the Postgres docs, one can either do the upsrt method that's in 9.5 or later, or one can do what's documented here: https://www.withdata.com/blog/postgresql/replace-update-or-insert-a-row-into-postgresql-table.html Either way, this change seems to be totally missing a solution for Postgres. The solution I link to above is available for 9.1 or later (Supported Postgres versions are currently 9.4 or higher, so this seems ok?). The other solution requires 9.5 or later, while 9.4 is still in support, so this method seems cleaner. Also, I'm not clear why your solution here for MySQL is better (or worse) than what's done in #84, as they both seem to require the same level of MySQL to function (as per https://dev.mysql.com/doc/refman/5.7/en/replace.html) and they are both extensions to the SQL standard not supported by other products. Thanks! |
This adds support for doing upserts to Bugzilla's data model. The sql_upsert() method needs to be implemented for sqlite, oracle, and postgres before this can be merged.