X Tutup
Skip to content

add upsert support#90

Draft
dylanwh wants to merge 1 commit intobugzilla:5.2from
dylanwh:upsert
Draft

add upsert support#90
dylanwh wants to merge 1 commit intobugzilla:5.2from
dylanwh:upsert

Conversation

@dylanwh
Copy link
Copy Markdown
Member

@dylanwh dylanwh commented Dec 16, 2019

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.

@quanah
Copy link
Copy Markdown
Contributor

quanah commented Dec 16, 2019

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup