New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PG 9.5 Ignore Support #3206
PG 9.5 Ignore Support #3206
Conversation
97e7fef
to
5821ed7
Compare
see http://www.postgresql.org/docs/9.5/static/sql-insert.html Signed-off-by: albertlast <albertlast@hotmail.de>
forgot ON CONFLICT statement Signed-off-by: albertlast <albertlast@hotmail.de>
5821ed7
to
dac6f31
Compare
The pr got a bug, |
Easiest way around this is to just look for "beta" or "rc" in the string and only look at the first three characters if so (since you'll never have "9.5.1rc1" or anything like that). Something like this:
|
Signed-off-by: albertlast <albertlast@hotmail.de>
f254c67
to
464f157
Compare
@@ -91,11 +105,16 @@ function smf_db_search_query($identifier, $db_string, $db_values = array(), $con | |||
|
|||
if (isset($replacements[$identifier])) | |||
$db_string = preg_replace(array_keys($replacements[$identifier]), array_values($replacements[$identifier]), $db_string); | |||
elseif (preg_match('~^\s*INSERT\sIGNORE~i', $db_string) != 0) | |||
if (preg_match('~^\s*INSERT\sIGNORE~i', $db_string) != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the intention,
why here is a elseif used.
I got some error around this,
so i replace this with a if.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What error did you get? The "elseif" is used because we want to do that if $replacements[$identifier] isn't set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The query insert_into_log_messages_fulltext goes wrong,
it's take only the if part but it need to take the elseif part too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know either, but it looks like an error, from reading the code..
Signed-off-by: albertlast <albertlast@hotmail.de>
Fixed the tab and allman style |
again a smale db related pull request.
This added ignore support for the pg 9.5+,
pg 9.5 is current as rc available.
see http://www.postgresql.org/docs/9.5/static/sql-insert.html
Signed-off-by: albertlast