<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 03/05/16 08:18, gmele wrote:<br>
    </div>
    <blockquote cite="mid:1462256332020-148046.post@n5.nabble.com"
      type="cite">
      <pre wrap="">Hello Daniel,

I add a look to the db_unixodbc and the presence modules. To correct the
ODBC replace query that is visibly not supported by Oracle, I would like to
add a new parameter in the db_unixodbc module : replaceQuery = {0:1}. 0 =
not supported, 1 = supported (default).

Now, in the presence module, I found this comment :

        if (pa_dbf.replace != NULL)
        {
                if(pa_dbf.replace(pa_db, db_keys, db_vals, n_query_cols,
                                        2, 0) < 0)
                  ...
        }
        else
        {
                */* If you use insert() instead of replace() be prepared for some
                 * DB error messages.  There is a lot of time between the
                 * query() that indicated there was no matching entry in the DB
                 * and this insert(), so on a multi-user system it is entirely
                 * possible (even likely) that a record will be added after the
                 * query() but before this insert(). */*
                if(pa_dbf.insert(pa_db, db_keys, db_vals, n_query_cols )< 0)


What will happen if we do inserts only? Will the table grow? Is there a
purge mechanism somewhere?

Would it be possible in the replace method to do an update and in case of
error, do an insert?

What is your opinion?


</pre>
    </blockquote>
    you can add that parameter to control exporting the replace support
    - make a pull request on github and it will be merged. Name the
    parameter replace_query as the other parameters for db_unixodbc use
    the patterns with underscore and lower cases and format the message
    as suggested at:<br>
    <br>
      -
<a class="moz-txt-link-freetext" href="https://www.kamailio.org/wiki/devel/github-contributions#commit_message_format">https://www.kamailio.org/wiki/devel/github-contributions#commit_message_format</a><br>
    <br>
    Cheers,<br>
    Daniel<br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, Berlin, May 18-20, 2016 - <a class="moz-txt-link-freetext" href="http://www.kamailioworld.com">http://www.kamailioworld.com</a></pre>
  </body>
</html>