<p>Boris P. Korzun has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18059">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_config_pgsql: Add text-type column check in require_pgsql()<br><br>Omit "unsupported column type 'text'" warning in logs while<br>using text-type column in the PgSQL backend.<br><br>ASTERISK-29924 #close<br><br>Change-Id: I48061a7d469426859670db07f1ed8af1eb814712<br>---<br>M res/res_config_pgsql.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/59/18059/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c</span><br><span>index 81c165b..dbcd9e7 100644</span><br><span>--- a/res/res_config_pgsql.c</span><br><span>+++ b/res/res_config_pgsql.c</span><br><span>@@ -1234,8 +1234,8 @@</span><br><span> AST_LIST_TRAVERSE(&table->columns, column, list) {</span><br><span> if (strcmp(column->name, elm) == 0) {</span><br><span> /* Char can hold anything, as long as it is large enough */</span><br><span style="color: hsl(0, 100%, 40%);">- if ((strncmp(column->type, "char", 4) == 0 || strncmp(column->type, "varchar", 7) == 0 || strcmp(column->type, "bpchar") == 0)) {</span><br><span style="color: hsl(0, 100%, 40%);">- if ((size > column->len) && column->len != -1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((strncmp(column->type, "char", 4) == 0 || strncmp(column->type, "varchar", 7) == 0 || strcmp(column->type, "bpchar") == 0 || strncmp(column->type, "text", 4) == 0)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (column->len != -1 && (size > column->len)) {</span><br><span> ast_log(LOG_WARNING, "Column '%s' should be at least %d long, but is only %d long.\n", column->name, size, column->len);</span><br><span> res = -1;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18059">change 18059</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/18059"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I48061a7d469426859670db07f1ed8af1eb814712 </div>
<div style="display:none"> Gerrit-Change-Number: 18059 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Boris P. Korzun <drtr0jan@yandex.ru> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>