<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>That's odd : the primary key is on index and there are no foreign
keys. <br>
</p>
<p>Can you check if you have the same in your db ? <br>
</p>
<p><br>
</p>
<p>mysql> describe dbaliases;<br>
+----------------+------------------+------+-----+---------+----------------+<br>
| Field | Type | Null | Key | Default |
Extra |<br>
+----------------+------------------+------+-----+---------+----------------+<br>
| id | int(10) unsigned | NO | PRI | NULL |
auto_increment |<br>
| alias_username | char(64) | NO | MUL |
| |<br>
| alias_domain | char(64) | NO | |
| |<br>
| username | char(64) | NO | MUL |
| |<br>
| domain | char(64) | NO | |
| |<br>
+----------------+------------------+------+-----+---------+----------------+<br>
5 rows in set (0.01 sec)<br>
<br>
mysql> SELECT TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME,
REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME FROM
INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE
REFERENCED_TABLE_SCHEMA = 'opensips' AND REFERENCED_TABLE_NAME =
'dbaliases'; <br>
Empty set (0.01 sec)<br>
<br>
mysql> <br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 15.11.19 15:31, volga629 via Users
wrote:<br>
</div>
<blockquote type="cite" cite="mid:1573828293.9239.27@skillsearch.ca">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<div id="geary-body" dir="auto">
<div>Hello Everyone,</div>
<div>I am trying use in multi domain environment dbalias table,
but hit limitation where impossible insert more then one user
per domain.</div>
<div><br>
</div>
<div>
<div>opensips=# INSERT INTO dbaliases (alias_username,
alias_domain, username, domain) VALUES ('4384783197',
'dev-sip.networklab.tld', '452392',
'dev-sip.networklab.tld');</div>
<div>ERROR: duplicate key value violates unique constraint
"dbaliases_alias_idx"</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>We use PgSQL 10</div>
<div><br>
</div>
<div>Any help thank you</div>
<div>volga629</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>