<p>When values are read from DB, they are converted to C structures by going through these functions:<br>
db_postgres_fetch_result  --&gt; db_postgres_convert_rows  --&gt; db_postgres_convert_rows  --&gt; db_postgres_str2val<br>
Inside the last function (db_postgres_str2val), if the DB type is DB_STR, the len field will be filled.</p>

<p>The PR <a href="https://github.com/OpenSIPS/opensips/pull/618" class="issue-link" title="Use DB_STR instead of DB_STRING for string value (and as default value)">#618</a> set the DB type to DB_STR so that db_postgres_str2val will fill the .len</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/619#issuecomment-135379027">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciXT9sxUD5cRmaTZNHBD9Hxk5CXzwks5oruMDgaJpZM4Fytcd.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/pull/619#issuecomment-135379027"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>